Saturday, January 21, 2017

Still here?

I'm still surprised this blog is still here, getting occasional comments and makes people contact me directly though Gmail. It is mostly for Oracle stuff. I don't do Oracle stuff anymore. Sorry, I've been prodded kicking and screaming to SQL Server and MySQL/MariaDB. And it's 2017 so obligatory 2017 post. See you in 2018.

Tuesday, March 08, 2016

Beginning cleanup

I haven't posted in this dump for a while. I think the "art" of blogging is a dying technology for a couple reasons. One - it has been replaced by Twitter, Pintrest, image boards, etc. Two the technology was inundated by everyone and cream that rose to the top was licked off by a cat or something leaving behind the bitter curds or coffee or however you wish to apply this. Thankfully there are Google filters to help weasel out the prolific idiots that post as much as they can to sell their consulting services. You know who they are for Oracle, SQL Server, Windows and Redhat. Yeah, those guys.

Anything no longer valid or usable will go bye bye.

Anything requiring an update might get it (depends upon how I'm feeling that day)

Good rants will be kept; at least 0.00000000000000000000017 percent of the planet likes to hear me complain.

The really good stuff will get published again.

Monday, March 03, 2014

Ubuntu 12.04 Desktop, trying out themes

I use Ubuntu 64bit desktop virtual machines to do things that I do not want to corrupt my Windows 8 host with. One of the things everyone tells you do after installing desktop is install some themes. There are about fifty top-n lists on a quick Google search. I decided to give one a whirl.

A List Of Best 15 Ubuntu 12.04 Themes For Unity and Gnome Shell

One problem. Who wants to copy and paste all those install commands into their terminal? Use the code below to do everything at once: add the ppa, update, install them all, set them all, view them all, decide they all suck, remove them all, and then set things back to normal...
sudo add-apt-repository ppa:upubuntu-com/gtk3
sudo apt-get update
sudo apt-get install -y boomerang delorean-noir-theme drakfire-zuki elegant-brit-theme elementary gnomishgray ice-cream-theme ice-redux light-greyness-dark-grey macx-lion oceanic-dark slave-gtk3 yellow-n-black-attack zukitwo zukiwi

for CRAP in Boomerang Boomerang-Deux DeLorean_Noir Drakfire-Zuki Elegant_Brit GnomishGray ICE-Redux Ice-Cream-GTK Light-Greyness-Dark-Grey-GTK Mac-X-Lion Oceanic-Dark SLAVE-GTK3 Yellow-n-Black-Attack-GTK Zukiwi elementary zukitwo
do
echo Setting theme to ${CRAP}
gsettings set org.gnome.desktop.interface gtk-theme ${CRAP}
gconftool-2 --set --type string /apps/metacity/general/theme ${CRAP}
read -p "Press [Enter] to see the next one"
done

sudo apt-get purge -y boomerang delorean-noir-theme drakfire-zuki elegant-brit-theme elementary gnomishgray ice-cream-theme ice-redux light-greyness-dark-grey macx-lion oceanic-dark slave-gtk3 yellow-n-black-attack zukitwo zukiwi
sudo apt-get autoremove
gsettings set org.gnome.desktop.interface gtk-theme Ambiance
gconftool-2 --set --type string /apps/metacity/general/theme Ambiance
I guess I'm just a boring old fart.

Friday, January 31, 2014

Dealing with depression

I was going through my old, old posts on this blog and feel I need to update the Dealing with depression part of that post.

I have been diagnosed with a mild case of major depression disorder. I know that sounds strange, minor/major but it is mostly procedural. You need the MDD diagnosis code to get treatment covered by insurance.

Dealing with Depression

If you are like me, and (according to some news sources) like over thirty percent of the population in the United States, you deal with depression on (sometimes) a daily basis. These feelings usually manifest themselves in the form of feelings of hopelessness or you might feel tired all the time.
What not to do.

Drugs are NOT the Answer.
When I say drugs I am describing anything from prescription drugs like Prozac to binge drinking. Drugs are only a temporary solution to the problem and usually make things worse. I have seen some co-workers on the drug Prozac and they are both psychos, one step away from full-out fruitcake. I have family members on different prescriptions and they aren't any better. One has been on various prescriptions for twenty (yes, 20) years. The physicians just keep giving him the line "let's try this one". These quacks have no idea what they are doing, they just continue to milk the system. One of my friends smoked marijuana (i.e. pot, reefer, weed) to escape his depression. That loser is still depressed and now half his tenth-grade brain is gone. The common thread is that all of these people are still taking drugs and they are all still just as depressed, if not more than they ever were.

There have been at least three new classifications of anti-depression drugs that have entered the market since this was written. There is a blood test to determine levels of monoamine neurotransmitters (dopamine, norepinephrine, and serotonin) in your body and DNA tests to determine which drugs will work (or not work). A good, modern psychiatrist will offer at least the blood test; maybe the DNA test but both test are expensive and not all insurers are covering them yet. Once the results are in the psychiatrist will prescribe the best drugs to help with your depression. Drug affect people differently. What might work for one individual might be a nightmare for another. When starting most drugs expect the first week to four weeks to be hell – insomnia, diarrhea, anxiety, weight gain, weight loss, etc. After that breaking in period the medication should start working. I still believe there are plenty of quacks out there that simply a drug from the short list of what has worked best for their patients, hope it works, if it does not they try another one until some combination of the forty or so of these drugs work. The goal of the blood and DNA tests are to take the guesswork out of the equation (so insurance – would you rather pay for the tests and get it right or pay for a dozen quack visits).

Shrinks are NOT the Answer
If you a rock star or some wealthy Hollywood name, then a "shrink" might work for you. For the rest of us that need to work for a living, you might as well just stop someone on the street or sit next to someone at a fast food joint because you are likely to get the same answers. Basically you pay a "shrink" to listen and make observations but every single session boils down to a prescription (see above). They do not have the answers or if they do they are canned answers you could probably get from a box of cereal or Miss Cleo. I saw a psychiatrist once, and that was enough. There are no easy answers to anything, but there is something that can be prescribed.

Shrinks are necessary. The psychiatrist prescribes the drugs and the psychologist does the talk therapy. You usually need a psychologist referral to see a psychiatrist. My opinion on psychologists is still mostly the same. A therapist is good for three or four sessions before the information, dialogue and time off from life, etc. start becoming repetitive and in my opinion not of much use. If your employer has a wellness program for therapy sessions then by all means use them. First session should include doing paperwork to refer to a psychiatrist. If you suffer from chronic depression you likely need medication so get this started as soon as possible so you can have medical and verbal therapy working at the same time. The psychologist cannot prescribe medication. Use the first session to get all of your history with depression and any trauma at any point in your life in the open so the psychologist can assess your situation and then give you some first steps. The following sessions should clarify your situation and your psychologist should give you "tools" you can do to help your situation. Try doing what your psychologist says. Yes they are guessing but they work in what is common solutions to common problems; fix what is most common then work on the particulars. Eventually though, in my opinion, things start getting repetitive and the therapy starts getting beyond the scope of the psychologist. Obviously, if you have suffered a major trauma in your life do not listen to me and do therapy until you do not need it even if it takes decades. I speak for dealing with typical depression.

Another route is dealing with a family doctor first and then let your doctor do the referral if needed. I do not have the professional training to tell otherwise but here is what your doctor will do. They will prescribe one of the most commonly used generic medications first (Prozac, etc.). If that does not work they will either add second medication (effect a different neurotransmitter) or switch you to whatever brand medication they are being asked to pimp out (you will be given samples, a coupon card and a Rx). You might also be placed on Abilify (currently, a very popular add on drug; not sure if it is at the pimp stage at family practices yet but I wouldn't doubt it). If you are still depressed then you get the referral to a shrink. In my opinion, do the therapy route. Family doctors are great for keeping you healthy but there are reasons why there are specialists.

Is God the answer?
Maybe… Part of the problem with religion or other social groups is that they remove your self-esteem by placing everything in someone else's hands. Instead of depending upon yourself, being responsible, and understanding your strengths and weaknesses, everything is now controlled by an external entity (i.e. God or insert religious icon here). It works for you if you can completely give yourself. For most people it works temporarily until that first bout of doubt sets in, then there is the possibility (finishing my incomplete quote) for relapse and you might need to go to doctors anyways.

I really have no evidence to support or refute. My history with religion is personal and will not be discussed here. Best advice would be to not solely rely upon a deity for fixing depression. If you need medication for depression then see the right people and get on it; unless your deity is going to fix your brain chemistry for you.

My Solution?
Be depressed.
Seriously. Believe it or not, depression is a completely normal state of being just as happiness, sadness, ecstasy, and indifference are. It's okay to be depressed. If you are depressed, chances are good there is a reason why you are depressed. A couple of days later, you might still be depressed or you might do a one-hundred percent turn-around and be glowing with joy. It might even take a month or a year or your entire puberty. It's part of life. Depression makes happy days happier but can be overwhelming at times. Most people that "suffer" from depression have succumbed to it. Don't succumb to it. When the day is done, go over to the calendar and mark off the day because it's over.

Wow, that was a simple solution. I still believe the first part. Depression is normal and for most people it is not necessary to be happy all the time. If you had a rough day at work, had a family member leave or pass away, then you should feel depressed. That is natural. When depression overwhelms the day to day then it is time to look to therapy and medicine. Depression can require medication to cure. I still believe the second part because I think way too many people let depression (anger, anxiety, etc.) overwhelm them and they immediately go to something other than their own built in mechanisms for dealing with depression. I also think many people want that quick fix

I would also like to apologize for trivializing a lot of my previous statements. Depression is a serious condition. I was able to overcome depression in my early years through realization that occasional depression is acceptable as part of life, chances are good that most of what is making you depressed is out of your control and no medication or therapy is going to fix what you cannot control, and when I was depressed I should have been depressed. After dealing with friends and family dealing with depression, suicide, and attempted suicide I have come to learn a lot more about depression. Depression is a health issue and all people are not fruitcakes. Most of them suffer from mental health issues and are in treatment and with successful treatment are competent members of society.

The state of mental health in central Ohio is not good. There are not enough facilities, emergency facilities and treatment options available to individuals with mental health issues. Recently, one patient had to spend three days in an ER hallway waiting for a bed to open in the mental health ward. I had to wait six months to get into a psychiatrist office.

Here is a link I found useful during my life with depression:

Wednesday, February 29, 2012

Another year flushed down the toilet

Wow. Exactly one year has passed since I last posted to this blog. What does that say?

Not much, really.

With the rise of Facebook, Twitter and Google+ (well, the first two) blogging for the normal schmuck has decreased leaving only folks who have something lengthy to say, spammers, and political knobs that probably have too much time on their hands. I will say that this blog came in handy today.

It was one of those scenarios where I remembered a piece of code was blogged here at some point. My employer blocks most blogger blogs (malware delivery systems) including this one so I used my mobile device that also makes phone calls to look my post up. The old blog looked pretty neat on that mobile device; formatted for the smaller display.

I took that mobile device into the bathroom stall to do some light reading while I took a dump. I went back through my old posts. I was proud of most, embarrassed by others. I began pondering if it was worth the time to go back, clean up the good posts, remove the crap, and maybe start blogging again. Then I flushed, put some music on and went back to work.

Long story short; I'll likely clean up some stuff then put this blog to rest.

It's been fun. Sort of.

There are plenty of other people on this planet to do Oracle stuff and rant about things.


Monday, February 28, 2011

I hate it when I am wrong

I recently learned that one of my blog posts about the Oracle MERGE statement has one not one-hundred percent correct statement.

"This means the DELETE does not use column data in the USING clause sub-query; very important. Some column in the UPDATE must be updated for the DELETE to work. To handle this set one or more columns to values that would never appear (in combination) in the data and use those values as a delete trigger."

From Oracle 10g 2 and higher SQL Guide: "Specify the DELETE where_clause to clean up data in a table while populating or updating it. The only rows affected by this clause are those rows in the destination table that are updated by the merge operation. That is, the DELETE WHERE condition evaluates the updated value, not the original value that was evaluated by the UPDATE SET ... WHERE condition. If a row of the destination table meets the DELETE condition but is not included in the join defined by the ON clause, then it is not deleted. Any delete triggers defined on the target table will be activated for each row deletion."

To clarify:

The DELETE WHERE condition can reference a column from the USING (the source) but the row table in the MERGE INTO (the target) must be have a column updated.

I need to do more experimentation before I correct previous posts and the best way to code for this. I am guessing that a "transaction" column can be in the source (USING) and then that can be tested on the DELETE WHERE and is part of a DECODE(u.indicator,'DELETE','i.column,u.column) so false data are not needed for columns with a NOT NULL constraint.

Wednesday, February 02, 2011

PCI compliance

Why do searches for PCI compliance on the database return only links to people selling software and or consulting services?

Thursday, January 27, 2011

New mobos and 16GB memory

So I'm going through Newegg looking at motherboard plus AMD processor combo deals, tempting myself to spend money. I want a system with 16GB of memory so I can do virtualization (as in Windows DC, SQL Server, Oracle Database all running at the same time). The first five motherboards I look at support 16GB of DDR3 memory in their specifications at Newegg and at the manufacturer website but when you look at the memory compatibility list NONE of them have verified configurations with 16GB of memory. NONE of them. How can you claim support without verification? The most common verified configuration was 2GB of memory. Who the FRAK buys a high end motherboard with the intent of having only 2GB of memory. That will barely run Windows 7 Ultra Professionasupercalifrakkinfantastic 64bit turbo while watching Blue-Ray movies and playing Crysis 2 full screen at 2 billion frames per second.

Friday, January 21, 2011

VMWare teams, part one

I'm fartin' around with Teams in VMWare Workstation and publishing steps I have used.

Team

What you will need:

  • Windows Server 2008
  • VMWare Workstation
  • hardware with at least 4 GB of memory and 200 GB of disk
  • patience
  • some beer or alcohol of choice helps too

Steps:

  1. Create a Team
  2. New Team; named SewerSystem
  3. Don't add VMs yet
  4. Add one LAN segment
  5. Finish

VM1 - Domain Controller

Steps:

  1. Add new VM; Typical for Windows 2008 Server Core (easy install) SepticTank located in the SewerSystem directory
  2. Modify VM configuration to have a single NIC on the LAN segment
  3. Let easy install do the OS and VMware tools, create a user called sadmin
  4. Log in as sadmin after installation completes and reboots a couple times; there should be a command window:
  5. netdom renamecomputer %USERDOMAIN% /NewName:DC1
  6. netsh interface ip set address "Local Area Connection" static 192.168.0.1 255.255.255.0 192.168.0.1 1
  7. net user Administrator Passw0rd1234
  8. shutdown /r /f /t 0 /d p:2:3 /c "STFU"
  9. start /w ocsetup DNS-Server-Core-Role
  10. dcpromo /unattend /AutoConfigDNS=Yes /DomainNetBiosName=grouchnet /NewDomainDNSName=grouch.net /ReplicaOrNewDomain=Domain /NewDomain=Forest /ForestLevel=3 /DomainLevel=3 /SafeModeAdminPassword="Passw0rd1234"
  11. net user a-grouchy "Passw0rd1234" /add /fullname:"A Grouch" /domain
  12. net group "Domain Admins" "a-grouchy" /add /domain
  13. net user e-grouchy "Passw0rd1234" /add /fullname:"A Grouch" /domain
  14. net group "Enterprise Admins" "e-grouchy" /add /domain

Step descriptions:

  1. duh
  2. duh
  3. duh, the easy install can't log in as Administrator so create one
  4. duh, I had to log in once or twice and reboot
  5. rename computer
  6. set NIC to static IP
  7. set Administrator password (was blank)
  8. reboot
  9. configure DNS
  10. configure domain controller (reboots)
  11. add a domain admin user
  12. add to the domain admin group
  13. add an enterprise admin user
  14. add to the enterprise admin group

References: