I have been rockin on a new application. I have about 12 hours in it right now. I picked up Torque and gave it a try. Everyone loves Hibernate but me. I did not like my experience with it at all. The community around it is pretty cool, but I just couldn't get Hibernate. Then I tried to update it and whoa buddy...
I bumped into Torque in a very round about way. Reading the Struts mailing list, I ran across James Turner. I dug what he was saying so I started looking at what he has done in the past. Nifty, article on Torque, hmmm wonder what that is... Whoa YAPL (Yet Another Persistence Layer). I must say, I was up and running with Torque in less than 3 hours (about 5234520 hours less than it took for Hibernate, I must be dumb) with some working tests and some new ideas. Of course Torque doesn't do Aggregates (Is there a persitence layer that does?) and so I have to figure out what I am going to do about that.
Anyway, I really wanted to say that, dang it takes to long to write an app. I have this killer vision on how things should work. I know just what it should do, but actually getting it done is another matter.
Where will you be? What will you have accomplished? Matt is always asking the hard questions. I haven't thought about this in a while, mainly because three years ago I had accomplished all of the goals that I had come up with as a kid. That was a very unique feeling. It was so weird, that I took three years to enjoy it :) During the three years, I set one goal, I have yet to reach it, but I think I may actually make it in November. I am going to keep that one private, because I don't want to jinx it.
Wow, that is some list. I can't wait to look back and see how many of these I have accomplished.
JavaWorld has an article about performance that pretty much answers my questions from yesterday. It is better to focus on good design than to focus on optimization. If the design is good, your performance will be good as well. Not to mention, easier to maintain.
Any one out there reading my blog know if writing Java in proper OOP causes faster execution? I have a friend that basically counts instruction sets of every line of code he writes, and avoids instantiating objects because "it costs to much". Now, this doesn't mean that his code is all in one huge object :) but it does make some of his design decisions go in... weird directions.
He stated today that he could take any OOP system, and make it non-OOP and it would be faster. He did agree that when you go to update said non-OOP software that it would be a nightmare. Finally, his primary argument is that OOP causes developers to use good design which in turn leads to faster code. So I am confused as to why he wouldn't want to use good design and give up counting instructions.
My question is, does the JRE have an optimizer that understands OOP and somehow makes more OOP-ified code run faster?
Some weekend! I redesigned the layout of primary client's site, wrote two long winded articles and spent a load of time with my kids. What an awesome weekend!
In light of my previous post, my brain went into overdrive this morning. Funny how sleeping on a subject will usually bring the answer to you first thing in the morning. Russell is responsible for getting the thoughts churning on this topic. On one project we had a 28 page SOP on how to set up your development environment. That ensured that everyone had the same setup and troubles could be easily fixed because all workstations were the same. But this meant that only a few people actually knew what was involved in setting up a workstation. Everyone else just followed the SOP.
After reading some of Russell's posts, I came away with the idea that he worked in an environment where everyone knew enough to be able to set up their own development environment. This got me thinking about what kind of people Russell must be working with. In short, smart people.
My hypothesis is that smart people are going to know more about what is needed to get started on a project. They will know how to set up their IDE for their needs. They will know the best ways to "make" their code (ant in the Java world). They will know CVS or some other CM tool. They will have thought about all of the situations that would cause a need for these tools. Following are questions that a new developer should be able to answer...
Which IDE do you use? The answer doesn't really matter as long as they have a favorite. But bonus points are awarded for using IntelliJ IDEA :)
Can you create a project in that IDE from scratch? A "no" here brings serious doubt to the candidate.
Do you know Ant? If it is a Java position and they don't know what Ant is, start losing hope.
Have you ever written or modified an Ant script? Hope for a yes.
Did it work? Again, hope for a yes.
Have you ever used CVS or some other CM tool? If they answer no, then you should seriously question their credibility as a developer.
Do you know how to checkout, update, commit and add? See last question.
If they answer in the affirmative to all of these questions, and you still have doubt, then you ask them how-to questions. Remember, you are looking for the thought process and not neccessarily what the KNOW.
What are the differences between GET and POST? If they don't know web-apps, and you are doing a web-app, and they aren't geniuses, hang it up. You will spend to much time explaining the intricacies of GET and POST or other web related concepts.
If you had to set up a web-app, what would your skeleton directory structure look like? The answer should be graded on consideration of the situation, not the actual answer.
What would your targets be in your ant script? Again, just looking for the way their brain thinks. If they don't have a compile and clean, well... They may not have a clue, because they found one that works and have copied and pasted it all over the place. That is better than nothing.
Have you ever helped out on an open source project? If they have, then they can stand on their own two feet. This is a good thing and deserves bonus points.
Find out if they can "fend for themselves". Can you read? Will you read? Can you find answers to your problems on your own? One of the ladies I worked with had an issue here, when she came on board I gave her the url to a couple of Struts documents. She came in the next day with the documents printed out, but she never actually READ them! This is actually the hardest attribute to expose.
This isn't the be all end all of Interview Questions. Joel's excellent article on interviews is a great resource. Have I missed any questions? Is the hypothesis correct? Or do you need coworkers that don't know all of the ins and outs of the development process?
This week I was made the lead developer on my project. I am not sure if this is a good thing or not, but either way, I want to do the best that I can. It means more "management" and less "development", which is a bummer, because I am starting to enjoy writing code.
I have been trying to remember what I wanted from a lead developer when I was junior and didn't like my managers. So, maybe I should make an exercise of remembering what it was that I didn't like.
So, I need to listen to my developers. I have a hard time with this because they are junior and don't know what the heck they are doing. *Laugh* this is probably exactly what my managers were thinking when they were not listening to me. But I learned a valuable lesson last week that applies to this situation. It doesn't matter how many of your ideas get tossed out; you are still adding value to the team by making suggestions. Even if your suggestion is not used exactly the way you want, pieces and parts of it will be used, and that helps make the team better. So, maybe a contract with the younger developers should be made that says, I will listen to your ideas, and more than likely I will use some of them. But you should listen to my ideas and give them the same amount of consideration. I think my leads that I grew to hate had some interesting ideas, but the lack of respect from both sides got in the way of coming up with good solutions. Please leave the ego at the door.
I may have to give up coding. That is a bummer and not really something that I want to do. Architect is being thrown around so often now that it is sickening and I honestly don't think that I deserve that title at this time. I seem to think my team isn't that bright. I know for a fact that my roommate is very smart; however she neglects design and just "does". Not to mention there is no testing involved. Training would help the situation, but where is she going to get trained? Sun doesn't offer a class on "Test First". Although a good OOAD course would be very beneficial. To top it off, I don't think I did a very good job of teaching either. Maybe teaching is one of the things that will fill the time where I am not developing.
Don't make extra meetings. You don't have to call everyone to get a status on what they are doing. You can stop by each person's office and have a one on one conversation that will be more beneficial and waste less time. I should be sure to have the developers keep their channels of communication open as well. Currently, our offices are spread across the building; maybe I can convince my boss that it will greatly improve productivity if the offices were closer together.
Avoid dumb rules. A democracy isn't needed for votes on whether or not a rule is dumb or not. If you listen close enough, and if you have enough one on one meetings, you will find out if your newly implemented super-duper rule is dumb or not. A bit of common sense will help this as well. Would I follow this new rule if I wasn't the boss? If the answer is no, then there is either a problem with the rule or there is something really bad that should be fixed. Laws are usually made because someone is getting hurt, or someone else wants to move effort off of themselves. Don't make rules so you can be lazy.
I keep thinking that my team members are inferior. This will cause problems on so many levels that it must be fixed. Probably before I go back to work on Monday. So let’s address why my team members are inferior.
One is slow. Maybe he is more methodical. This means there will be fewer errors in his code. The perception of him being slow has caused me not to give him assignments because I am afraid he won’t deliver. Humorously, he has never been tested, so how would I know if he really is slow?
Two is slow as well. However she has been tested and is known to be slow. She also does not complete assignments and is very fearful of challenges. The weird thing is that once she gets to know something, she is no longer fearful of it. I gave her an assignment and she was very hesitant to get started, but once she actually started writing code, she made things happen. She never really finished the assignment or follow the specification she was given. She also copy and pasted a bunch of her code, from Three's code. This means she lacks the understanding of what that code does and has created a mess in having the same code in two places. This is one of the things that I have tried to get across to the team unsuccessfully. If you have code in two places that means you need another method or class. This has caused several Util classes to pop up that have one method and very little substance. It is poorly designed code that has to be cleaned later.
Three is leaving. She was supposed to leave two months ago, but her boss said she had to stay put. Now she is supposed to leave in two weeks. If it doesn't happen I am going to be in a bad spot. Having someone on your team that doesn't want to be there is bad for everyone, especially that person. Three is smart but has some learning to do. I really like Three as a person, but her skills need honing, and every attempt that I have made at helping her as come across as an insult. That is very irritating because I have always been open minded to criticism from those that I thought were smarter than me. I guess she doesn't think I am very smart and therefore is insulted when I suggest that she is making a mistake in her code. She is a brute force programmer, and uses 6 ifs when 2 will do. I love her, but I don't know how to help her.
Four is an all-star. He can do anything. He deserves to have the lead developer spot. As a matter of fact, it was offered to him before it was given to me. He told our boss that I should have it since I have been on the team longer. I have considered stepping down and allowing him to take the reins. This would allow me to sharpen my coding skills and I would get to watch a pro run the show. But, I don't think I am ever going to learn what it means to be a manager unless I take on the responsibility. This is my chance, I have to take it. He is very smart and he will have more chances in the future. Only an all-star would step aside so someone else could step up to the plate.
I am sure this topic will come up again so I am going to stop now. If you have any insight, I would really appreciate to hear from you.
It appears that the IntelliJunkie crew has grown again today. There are so many small things that make IDEA such a great browser, but I think Jason sums it up well. If you haven't tried it, I suggest you do. If you have tried it and didn't like it, please tell me why. I think there is no better advertising than: my company wouldn't buy it for me, so I purchased it myself.
I have previously mentioned that I often have problems with self confidence. Humorously, it seems to be a topic that is coming up more often in my life these days. Today, my boss sat me down and basically said, "You are smart, quit worrying about getting things wrong. Just do the best you can because it always benefits the team." She also said that I shouldn't make other people's problems my own. IE if someone chucks an idea of mine, or gets bent because I bring up a problem, I shouldn't hold myself responsible for their short sightedness and "not invented here" attitude. I think I am getting better, but it is going to be an uphill battle. As Vivian Ward said, "The bad stuff is easier to believe."
Everyone's favorite Blogger has just added trackback functionality. This message is primarily to test Roller.
I think I am going deaf. This really sucks. All the years of listening to loud music is taking a toll. My wife is constantly telling me to turn down the tv because it is too loud. I don't know, maybe I just need to clean my ears a bit better or something. All I know, is that it is gonna really suck not hearing my kids speak or music play.
I have had this idea in my head on HOW I wanted to solve a problem, but never really knew if it would work. I didn't KNOW because I am not very familiar with Tiles. So, today, I left work and brought with me my trusty Struts In Action book, my headphones, and a serious desire to at least TRY my idea. Two and a half hours later, it works.
I am a bit concerned though. I don't think I am doing it very "well" and I doubt that it will scale properly. Basically, I need to know what is in a List at the top and bottom of the page. The example I used for my test was a list of items in a shopping cart, and have the highest and lowest priced items displayed at the top and bottom of the page. So, I chunk the List into the request after filling it. Then I have a Tiles Controller grab it, get the pertinent information out and send it out to its tile. Then iterate over the List again for display.
Here are the two things that bother me. What if I want to send more than one list to be displayed? And do I want to iterate over each List twice? One strategy would be to fill the hi/lo bean while I am filling the list... I mean, the list is in a containing ActionForm, so I guess that ActionForm could hold the hi/lo information about the Lists. That kills the double iterate. I am thinking outloud here, and rambling, so I will go to bed and think about it some more.
I am secretly impressed that I started a brand new project from scratch and finished in 2.5 hours. Yeah ME! :) Props to Patrick for his awesome articles about Tiles, they really kick started this whole process.
I absolutely LOVE being productive. I don't think there is anything more satisfying than finishing a quality product. But why is the only time that I am able to be productive is after everyone has left the building? Very frustrating and satisfying at the same time.
I seem to be the only person that has RSS feeds on my blog. Which makes me wonder, am I the only person that uses his blog for a home page? When I set my blog up, it was partially to put my thoughts down, and communicate with others, but also to scratch the itch of reading what is on other peoples minds.
I have seen a bunch of aggregators out there that people are building. I tried one that was written in C# called SharpReader. I also tried Zoe out, but it was more for reading email, but Zoe has great potential to be a good aggregator. I found Zoe while I was researching Lucene.
Anyway, I dig having my own personal portal, sans advertisements. Everyone offers up the RSS for their site, but who is using them? Only the aggregator crowd? I am just wondering what others do for RSS feeds.
Has anyone out there used (IE Implemented something) Lucene? My database at work is a complete mess (mainly because we have a dope smoker for a dba) and I would like to off load searching notes fields from the database and have the other fields of the row be connected to the notes.
IE if someone's car died while traveling through Texas, a table would have a row that had location information (Texas) and a notes field that would capture what happened (car died). If I search on "Texas car" is that going to give me a hit?
From what I have read so far, I have hope that it will. But if there is someone out there that can dash my hopes before I go spend a week trying to make it happen... Please let me know.
Well, I never really got an answer on the tough questions that I was asking about Hibernate, so I decided to go a different route. I started using the old tried and true HQL instead of trying to use the new expression syntax only to find out that HQL has issues of its own. Bummer.
I was trying to put aggregate functions into a POJO. That is unclear, so I will use a picture (ya know... 1000 words...). Here is the HQL:
select new Family(mother, count(kittens)) from Cat as mother left join mother.kittens
Which was in turn generating:
select mother.name, countkittens) from Cat as mother....
That one paren isn't a typo. That is what was being generated. I tracked it down, fixed it and submitted it back to the project.
It feels good to help out, I am just not very proactive. I definately would like to fix the expression syntax so that it would work, but I am very afraid that I will implment it wrong, or wont have the same ideas that the project lead has. Maybe I should just jump in and do it. That is kinda scary. It isn't like this is some peice of code that only I am ever going to see, this is an open source project and a popular one at that! My greatest fear: "Hi, my name is Carl, and I screwed up Hibernate. Thanks for having me here at OSPKA." (Open Source Project Killers Anonymous)
My friend Ed just launched his new site: http://www.cincinnatinewmedia.com. Ed's work with Flash and Sound are just beyond belief. Check his site out, you won't be disappointed.
So, Hibernate is pretty cool, but I am almost tempted to go back to writing my own SQL. Almost. I haven't really worked with it since last weekend, so I guess I should really dive in and work it out this weekend.
I was a bit frustrated with the "support" though. I think that is one of the major problems with Open Source, you start asking hard questions, and the support dries up. Or, in the worst cases, they just start calling you stupid for asking questions. That is one of the reasons I stopped hanging out in #java on IRC. I couldn't take the snide comments anymore.
I am not a super genius. I will never write my own persistance layer. But with a little guidance, I think I could add some cool features to an existing solution.
So, Slashdot had their annual fun day with April Fools, but other than that, no one played any pranks on me. Not to mention, I didn't play any pranks on anyone either. I guess I am getting old. Anyone have any good pranks this year?