
ABCD
Monitor Woes
Sun, 30 Nov 2008 04:34:53 GMT
I am working on this website. I am looking at the project page. The title for each project doesn't really stand out, so I'm thinking to myself, I should put a background colour on that cell. I'm trying to find out what happened to a line I thought I'd put in (a border-bottom) that wasn't showing up. I hit inspect on the cell and discovered that each cell was in fact separated by a line, and that the title cell already had a background. I moved the window from my crappy cheap Acer to my iMac screen. HOLY SHIT, it's a different colour!
I think that finally puts the nail in the coffin on this monitor for me. I've been desperately trying not to go out and buy a new monitor because it just seemed like an unnecessary expense. I mean, how much do I do colour work that I need to be able to see acurate colours for? I could just put that stuff on my main monitor surely? But for heaven's sake! The colour wasn't there. It was indistinguishable from white. That's not just a colour being off a bit, that's some serious contrast shit going on.
If I get paid any time soon by Century 21 or Talisman, I'm buying a new monitor. Now I just have to figure out which one. I know I want H-IPS or S-IPS and I really want LED backlit, but it's going to be costly. Maybe I can go somewhere in the middle. Peoples speak highly of the Apple monitors for the most part, though they are a bit dated, except the new one that goes with the laptops, though I could swear I saw it was hooked up to a mac mini at the apple store.
When the light goes on
Sat, 29 Nov 2008 05:15:36 GMT
So I am building this web app. For the first time, I'm trying to do it by the book. I have a spring context, DAOs and ORM through hibernate. Everything seems copacetic. Then I realize that the logic for stopping a workflow item has to be in two places. So I do the seemingly sensible thing and I pull it out into a method.
A few days pass, and the thought dawns on me that this is what they mean by 'business logic'. An operation that can be called independently of the website to perform a function against the data. The light goes on in my head. The ActionBean should be looking up an instance of this business object in the spring context and setting member variables and calling a method on the business object.
All my functionality like that should be moved into business objects.
D'Oh, Yay! I finally 'get it'. Nobody ever explained how this stuff is supposed to work to me.
This is a subtlety that most MVC guides fail to point out. There is really another level of abstraction there, MVCB, Model, View, Controller and Business Logic. If we were in a SOA this would be the stuff that would be at the other end of the service.
Let me tell you how awesome this is going to make Dot Artistry when I get it going.
Music
Tue, 25 Nov 2008 05:25:56 GMT
Just got the new Dido album. So far I am super un-impressed. There are zero songs that have really made an impression on me so far. Very drab. Maybe I'm just not tuned in to it yet, but so far it's pretty ignorable background music.
I'm disappointed.
Hibernate Fun
Sun, 16 Nov 2008 22:05:20 GMT
I am struggling through Hibernate funness. I bought the O'Reilly book, but it's a bit thin, and after reading a few peoples' reviews, I also got the Persistence with Hibernate book from Manning which is AWESOME.
the merge method is evil. It looks like a good replacement for persist() but it isn't. merge() doesn't actually tie the object to the database state, so if you call merge() repeatedly on an object with no Id, it will save it repeatedly. persist() however does the right thing. The only thing merge gives you is the ability to save an object across sessions, but it would probably be better to attempt to re-attach the object instead of merging it.
John Williams
Tue, 11 Nov 2008 20:29:41 GMT
I am listening to Vaughan William's second symphony, the Lento. It's eerie. It's eerie because it sounds almost exactly like the Star Wars music in several places. I keep expecting it to continue one way, but then it doesn't. It's a bit disconcerting. If we didn't know who John Williams got his inspiration from before, we sure know now. If not, then it's an amazing coincidence. It's very disturbing because the opening oboe line has the same first few notes as one of the themes from star wars too. The rest of the movement also sounds like it could have been lifted straight out of a John Williams score. Of course Vaughan Williams lived before John Williams was born, so it's definitely the one way not the other.
Gym
Sat, 08 Nov 2008 03:54:36 GMT
Gym's been going pretty well. I went Wednesday night with Thomas, we missed Thursday due to somebody turning off the alarm, and us not waking up till Riordon came in. We slept in today but went to the gym a bit after lunch which was good. I managed 15 minutes on the elliptical, and 25 on the bike. My feet and bum start getting numb after awhile on the bike, which is a bummer because it's probably the thing I can do the most time on whilst keeping my heart rate in the target zone. The elliptical pushes my heart rate kinda high, and I don't want to fall over dead just yet.
Windows
Thu, 06 Nov 2008 18:59:55 GMT
For once, I'm gonna stop bitching about my Mac, and take a really stupid thing in Windows to task.
I am having issues with IntelliJ, so I scanned my user directory for anything named intellij. It pulled up a dir in my temp dir. I discovered that in my temp dir are files older than 6 months, and the sum total of all the files is over 8GB!!!!
Not very temporary is it if it never gets deleted.
Might Mouse
Thu, 06 Nov 2008 03:46:53 GMT
I've had a wireless might mouse for awhile, and I'm finally putting it away, and I totally fed up with it. Frequently it disconnects completely leaving me stranded with no mouse until I pull out one with a wire. The scroll nubby frequently will only scroll up, not down. Do you know how unbearable it is not to be able to scroll down?
I am looking for a new mouse officially. I have a Sony Vaio mouse which is okay. It's bluetooth which is a plus as it doesn't take up a USB port for a reciever, and I have precious few USB ports left even with a seven port hub. it's main problem is it doesn't have horizontal scroll.
I like the Logitech mice, but they don't have a decent mouse in bluetooth last time I checked, and I'll be painted blue and pink stripes before I buy a microsoft mouse.
Oh, and what's with browser on the mac tabbing right over select controls?
Worst Fears
Wed, 05 Nov 2008 04:46:30 GMT
All my worst fears are unfounded. The country has spoken, and spoken loudly. Thank God. I breathe a HUGE sigh of relief.
All we can hope now is that President Elect Obama will live up to his promises. Let's hope he brings home troops from Iraq, brings us universal health care, and brings federal funding to education.
Maybe the sun is finally rising on what has been a dark period for America. Sense has won out over nonsense. Let's bring jobs back to America, and start growing our economy from the inside. Let's welcome immigrants like myself to this land of opportunity who help America grow and grow.
God save the Queen, and Barack Obama too!
VOTE!!!
Fri, 31 Oct 2008 03:36:24 GMT

THINK OF THE CHILDREN!!!
(Stolen from Neopolaris' Journal)
Y
Tue, 28 Oct 2008 17:23:32 GMT
Went to the Y again this morning. I'm a bit stiff today, wonder how I'll feel tomorrow when I do the evaluation and get set up on all the Nautilus equipment. Couldn't do quite as much as yesterday, we got there a bit late, and Thomas was done after a mile on the track which was about 12 minutes, so I pushed the rowing to 15 minutes, and got off at that point. Have to figure out something because I'd really like to be targeting at least 30 minutes. I also did have my iPod this morning, so it seemed like every minute passed with alarming slowness. I think I'll have to up my podcast subscription or else I'm going to run out of content and have nothing to listen to! Can anyone recommend good podcasts?
King Singers of 400 years of music
Tue, 28 Oct 2008 01:35:14 GMT
I'm cross posting this from classical_music
They sing each composer in the style that they wrote in, and it's so beautifully done. Awesome.
Happy Slippers!
Fri, 24 Oct 2008 04:05:27 GMT
I got some slippers off amazon, not too expensive. They are a bit on the small side, but they are super warm mocasin style slippers. They fit quite well when I'm not wearing socks. But I have to keep my feet super warm as we don't have heat today.

Review
Tue, 21 Oct 2008 23:55:24 GMT
I was introduced to a wonderful CD of music by the Naxos podcast:
Spotless Rose (Also available as an MP3 download for $8.99). This is a collection of songs/hymns dedicated to the Virgin Mary. Aside from their religious value, these are wonderful pieces of music, and some of them have quickly become some of my favourite pieces of music. The choral work on this disc is beautiful and inspiring. The choirs totally nail every track. My favourite is probably track 4 which is the second of a set of latin motets titled 'Ave Maria'. The careful use of major and minor seconds against more simple chords creates interesting and captivating sequences that keep you coming back again and again to listen over again. If you like choral music with a slightly modern bent, you will love this disc.
Now I must get back to my crazy work that I am procrastinating from.
IntelliJ
Sat, 18 Oct 2008 14:24:06 GMT
Can I just say that IntelliJ rocks. It detected that the graphic in my background-image inline style in an HTML tag in my JSP did not exist, and highlighted it as a problem. How awesome is that?
Plus, I have killer head-ache of doom :( so I'm a bit cranky.
MVC
Fri, 17 Oct 2008 01:54:23 GMT
MVC means Model, View Controller. Not Controller who makes a Model and passes it to the View. This is the normal usage of this system in many implementations, but that's not really what MVC is is it? The Model is an independent piece that isn't tied to the Controller directly any more than it's tied to the view. The Controller is responsible for updating the Model, and the view is responsible for rendering the Model.
In a normal Web based application, the Model is in the Database which is often an RDBMS. It doesn't break MVC to have the view talk to the database, because the database
is the Model. The big mistake of many ORMs is trying to represent the Model in two places, in the database and in the application server. This of course creates all the same problems as multiple master replication causes for a database product. Every transaction has to be replicated across both systems incurring a huge overhead and making transactions way longer than on a single master system leading to huge performance problems. It's pretty common sense that the best form of distributing load is to have a share nothing cluster where you put different parts of the data set on different nodes. This is in opposition to multiple master replication which puts all the same data in two places. This is good for redundancy, but bad for performance, unless your interconnect is as fast as your local storage, which is rarely the case (don't just think throughput, think latency too). Of course you can do the best of both worlds and replicate and distribute like RAID 10, but this means having homogeneous copies, not heterogeneous copies like relational data and objects.
If we think of MVC as a three legged stool as in the first, we have true MVC, but if we corrupt it, then we get Bad MVC like the second which is like trying to have a two legged stool. It doesn't work too well:

Presenting the Model
is the view's job. Preparing the data for presentation is
not the controller's job. The controller's job is to process user input and update the model. The model is not a transient object that's instantiated and reads data from a store to a Model object, that's a proxy. The
real model is the datastore. Most RDBMSes I know have pretty good methods to update the data within them. Most Models need to do internal checking to ensure that they are sane too and aren't corrupt. This behaviour does not belong in the controller. It's part of the Model. That means database constraints and triggers.
Any framework that forces you to build the Model in the Controller and pass it to the view is a corruption of MVC and is asking for serious concurrency and performance problems. This doesn't mean however that your View cannot be started by a servlet or similar that reads data from the database into a hash and then forwards the display to a JSP or something similar. Just that to do MVC right, your controller doesn't return a Model and a View like in SpringMVC, it might decide which view to send the user to, which will then in turn access the model.
This means that we need different functionality in the view than most frameworks give I think. Some of this can be done in JSTL, but it's kind of clunky.
I'm going to read the rest of the Wicket book in the hope they get this, but I'm doubtful.
Bazaar
Thu, 16 Oct 2008 16:16:43 GMT
bzr-gtk for windows!! YAY! I'm happy about this. I can finally look at my version history without booting a linux VM.
Wicket
Tue, 14 Oct 2008 23:02:02 GMT
Nope - it's MVC like everything else. Sad.
Wicket
Tue, 14 Oct 2008 20:27:57 GMT
I have just started looking through the book on Wicket. They seem to have the same feeling towards MVC that I do: it's a fundamentally broken approach to web sites. I'm glad I'm not insane :). I got a chance to read some of it whilst Thomas got his hair cut. I am hopeful that the rest is as good as the start.
Movies
Tue, 14 Oct 2008 15:51:35 GMT
The Matrix came out on Blu-ray, and I have a copy! How awesome is that?
Random
Tue, 14 Oct 2008 01:51:33 GMT
I joined the YMCA today!! Yay!! Also - I have discovered that it's remarkable hard to find orange pillow cases.
These are beautiful, but not really what I had in mind.
Java Java Jing Jing Jing
Mon, 13 Oct 2008 03:39:46 GMT
So a bunch of books arrived on various Java frameworks. I had a conversation on the #java channel on freenode and most people pan struts. They say that struts 1.0 was awful, and struts 2.0 is just about usable, but pretty bad. I asked what they thought of JSF (Java Server Faces) and they said that it's kind like asp.net in java, not really a ringing endorsement. The guy didn't like Spring MVC at all, described it as a train wreck. They liked wicket though, and didn't have much comment on stripes. The user in question had already validated himself by describing the very subtle difference between passing by reference, and passing a reference by value, which is a very subtle but important detail in Java, amongst other pearls of wisdom, so he wasn't a complete n00b. The drunk guy spouting aspersions about java.io.File suggested Groovy, but I haven't really looked at that yet, as you know, this was the drunk guy who was trying to re-invent Spring, and couldn't deal with cross platform file access. One of the Groovy guys is on the Java podcast I listen to (Java Posse), so I suppose that speaks well of it.
A guy who I worked with on another project had suggested stripes, and this is a person I have a lot of respect for, so I bought the stripes book, which is in beta, so I got a PDF, and they'll send me a book when it's ready. The upside was that I had a PDF to work with straight away, so I've spent the last couple of days reading on Stripes. It's pretty cool so far. It does a lot of sensible things very sensibly :). I like the general principle of convention over configuration, which is something Stripes in hot on.
I am guessing the wicket book will probably arrive Tuesday or Wednesday, and I'll have a look at that. I have a couple of projects that I need to do in the short term time frame so I need to make a decision pretty soon.
Bookshelf
Sun, 12 Oct 2008 16:40:02 GMT
So I built another
bookshelf. This time is was a quickie, and a small one for the little space between my computer desk and the wall in the library. I ditched most of the fancy stuff that I did on the big one I built last time. I just rounded the corners of the shelves/sides with the sander instead of going all out and routing them. I also just went up to 220 grit instead of the insane 800 grit I had before. I also wanted to move quickly and get it done fast, so the shelves aren't adjustable in position, they are all screwed in place. But realistically who the heck moves shelves around once you have books on them anyway? The shelves are designed specifically for computer books so they are separated with 11" to 12" spaces. As you might notice, there is a shelf missing from the middle. That's because I only made 6 shelves because apparently I can't count, and didn't realise that a 6' bookshelf would require 7 shelves with an 11" to 12" spacing. I used the same finish as I did for the other one - just lemon oil rubbed into the wood which seems to work great, and is nice and easy to deal with, plus I think it looks pretty too. I am so happy that I can now have the books I'm most reading close to my desk. It is teh awesome.
Spring MVC
Tue, 07 Oct 2008 01:30:30 GMT
Took a good look through the new Spring book over the weekend. I was hoping that Spring MVC would be the answer to all my prayers about a web based framework. It wasn't to be. I wish there was something that was between single controller, and portlets. The portlet spec sucks, and the documentation for it is lousy. There's like two books, one is on JSR-268, and the other is on JSR-168, and they both suck. Spring only supports JSR-168 at the moment anyway, and it seems kinda stupid to work with a technology that's already been obsolete for like three years. There seem to be zero docs on themeing, which is like the first thing you want to do with your portlets.
Anyway - I've ordered the newest good struts book I could see in the vague hope that struts has improved since I last looked at it. It seemed like a whole bunch of XML nightmare last time I worked with it that could be achieved with a well written web.xml and dispatcher forwarding (which is what I used in consultant-helper).
Somebody else I talked to recommended stripes, so I'm hoping to get the book on that when I get paid.
I also had got the book on JSF too that I was hoping wouldn't suck, but it doesn't look too hopeful.
It all seems that MVC is just fundamentally wrong. You don't have _a_ model, and _a_ view and _a_ controller. You have input data sets that need processing and then output data sets that all need initializing to render an output that are totally independent of each other. What's in the output fundamentally affects which data you want. One view of the output, say an XHTML page will want all the associated bits and pieces, headers, nav, other things you might like, latest news for this product/item etc. And the XML view just needs the basic data. Somewhere, something needs to know all this and initialize the Models appropriately based on what needs to be in the view. That's right folks, the view needs to drive the model, not the other way around. How else do you explain that pagination is fundamentally a view centric operation, but anybody in their right mind will implement it at the Model level, not the view level, because passing 2000 records through to the view from the database is stupid.
Also - why do we need a separate dispatcher from the web server? URLs are great for telling the system which page you want. Why not keep using them instead of re-inventing the wheel?
Really not my night
Wed, 01 Oct 2008 06:40:51 GMT