Wednesday, 16 November 2011

ORA-00001: unique constraint violated

(Pasted here for posterity so probably not an interesting read unless you actually have the same problem and found this while googling) One of my colleagues Leendert Visscher had this weird problem today with a Oracle+JPA+JBOSS getting a
java.sql.BatchUpdateException: ORA-00001: unique constraint violated

Even after making sure all the sequences were fine eg. like checking that quering a nexval and making sure it will not conflict with existing values, the error still persisted :(

The solution was to rebuild the index?!! FTW

We found it after getting the hint while googling a bit.

Friday, 14 October 2011

My kindle thoughts and experiences

Lots of people at work asked me about this, so while I'm writing it down, I might as well blog it..
I bought a Kindle Keyboard, Wi-Fi, 6" E Ink Display for myself last year over Christmas - got it delivered for free to a contact in the US that came back to South Africa that time, saved +-R800. Last month I helped my grandma buy a Kindle DX, Free 3G, 3G Works Globally, Graphite, 9.7" Display with New E Ink Pearl Technology - ordered it on the Monday got it on the Thursday +-R400 delivery (double that with import duty:( ).
Here are some of my opinions about what to buy.

9"big DX vs 6"small

  • 6" - nice and portable - fits in your cargo-pants-pocket/purse/small bag
  • 9" - better for reading pdfs - the letters are quite small on the 6" but if you rotate it 90 degrees it is still readable
  • 9" - double the price for 2.5 times the screen area (IIRC)
  • Because my grandma is a bit visually impaired (mainly got it to listen to audio books from audible.com) I made some adjustments to hopefully help her. We decided to get the bigger Kindle for her because it has ever so slightly bigger buttons, but they are better positioned and I could hack it a bit.

E-ink

I would not buy something that does not say e-ink i.e. black&white, no backlight, can read in the sun, looks exactly like paper and is an absolute joy to read.

Leather cover with built-in light

  • Its almost as expensive as the kindle itself.
  • Worth it in my opinion.
  • Uses the kindles own battery - never stuck with flat battery at the wrong time.
  • great for reading under the covers
  • With any cover you must be careful how you open it because if you open it on the wrong side you can crack your Kindle. I added some paper clamps and took off the levers for my grandma to avoid any nasty accidents (saw this tip on the interwebz):

Only buy from Amazon

Local importers pay the same price as you do and then add commission

Check the R/$ price before you buy

The 2 times I checked the Dx prices it varied from +-R3800 to R4200, just after I bought it the R/$ rocketed up another 40cent which whould have been another R400!

Buy international version if you are not in the US

When I bought mine, I had to go to the special international kindle page, maybe that changed..

3G or not?

  • 3G version is 40% more expensive :(
  • Its handy to be able to buy books over 3G when away from any ADSL with wirless.
  • I think 3G coverage is done by MTN in RSA, so if you have bad 3G reception where you live then maybe it is not worth it..
  • I'm not that sorry that I didn't go for the 3G one, because I do most of my syncing and buying from home in any case.

FINALLY:

If you have not noticed it so far, I absolutely LOVE my kindle, I can almost not read anything else. Other cool features:
  • Has awesome text-to-speach for books bought from Amazon (DRM:( .awz) and free (.mobi) books
  • Can play audio books bought from audible.com, you can buy them directly from a wifi device but not from a 3G device!!?!
  • Can play mp3s for you in the background
  • Can play podcasts or mp3 audio books - just copy them into the audible folder on the device
  • Includes a free dictionary and you can look up any word while reading.
  • Make notes, bookmarks, underlinings (can even see commonly underlined stuff if you are too lazy to do it yourself:)
  • Calibre is the awesomest crossplatform e-book management tool ever! and works great with my Kindle.

Wednesday, 21 September 2011

I just could not sit it anymore

Len Weincier opened my eyes to the possibility of a standing desk a couple of months ago and I've been pondering it ever since.
Recently I found myself in much pain when having to sit and work for extended periods of time (Since my baby son started sleeping in his own room about a month back I can't work in his room lying on my back any more).
It is so distracting that I'd rather stop working and go to bed.

Well tonight I could not sit it any more and I decided to try it out. I was thinking about all the things I'll need to move around if I want space in front of a wall in my study and how much work it will be, then it dawned on me I have everything I need to build a prototype and try it out.
My standing desk version 1.0 (to my wife's dismay I'm sure when she sees this in the morning):



Long-running preparations:
  • Learned to touch type (with the help of learning to type using the Colemak keyboard layout)
  • Got a proper usb keyboard to try this out.

Next steps:
  • I'm still googling to find out if its a good idea in the long term, but for now this seems much nicer.
  • Get some stickers to put on the index finger home keys. I saw Gary van der Merwe had them and I think it will help me a lot because this new keyboard has really tiny dots for feeling the where your index fingers should go.
  • See if I can come up with a better design with a higher spouse approval factor. It would be cool to have something that can easily convert between standing and sitting to avoid over-standing it.
  • Get a LCD screen so I don't have to balance my laptop so tenderly.
  • I can already see that my touchtyping skills will go to a next level with this because my hands are now under my laptop and thus it is much harder to steel a quick glimps (especially for seldomly used keys)