Just registered for the Mountain West Ruby Conf 2009, I am very excited. I went last year and it was a lot of fun and Salt Lake City itself was nice too.
Category: General
Deleting those pesky RFC-822 in-compatible emails with Ruby
If you have landed on this post from Google you already know what I am talking about, if not read the below intro.
I work for an “Enterprisy” company, so the standard here is using the exchange server and I am on Linux using thunder bird. Every once in a while I get those emails that the exchange server cannot convert to an RFC-822 compatible format and thunder bird chokes on em and even the web mail cannot handle these, the only solution so far has been going to the web mail and selecting the mail and moving it to trash.
Finally I wrote a script to automate the whole thing, it telnets into the server checks each message to see if it is RFC-822 compatible and if not moves it into Deleted Items, you can find the script here. (It’s on GitHub feel free to fork it)
Usage ruby telnet-imap.rb <server> <username> <password> <dryrun>
All arguments are self explanatory, dry run can be y/n
PS : if you mange you blow up your inbox you are on your own!!
UPDATE (2010/03/12): Looks like this has taken a life of its own, please see the comments to find a better/newer versions in different languages.
Learning Debt
Many of us in the IT industry know the term ‘Design Debt’ James Shore defines it as “Design debt explains the problem. When a team is working under pressure, they take shortcuts that compromise design quality. It’s like taking out a high-interest loan. The team gets a short-term boost in speed, but from that point forward, changes are more expensive: they’re paying interest on the loan. The only way to stop paying interest is to pay back the loan’s principle and fix the design shortcuts.”
I would like to coin a new team ‘Learning Debt‘ (if not already defined by someone), every week (if not every day) that you let go without learning something you have just increased that debt.
Conferences and books are excellent way to cut down on that learning debt. I find another really good way to keep it down is by joining or creating a groups of like minded individuals and having interesting conversations (after all what is life without interesting converstaions ? don’t know but it would suck), think about it as a gym buddy just as having a gym buddy helps you stay on track.
Don’t want to talk about the dangers of letting this debt get out of hand you probably already know it loss of freash ideas, mind rot, loss of job……
Internet Traffic Begins to Bypass the U.S
Internet Traffic Begins to Bypass the U.S, This article was published in NY Times
“The risk, Internet technologists say, is that upstarts like China and India are making larger investments in next-generation Internet technology that is likely to be crucial in determining the future of the network, with investment, innovation and profits going first to overseas companies.”
Remeamber the year 2000 bug and most developing countries did not have to worry since most of there systems were newer amd already handled that issue. Now with new Internet technologies going to outside US sounds like there is going to be a repeat.
Chrome
Since I read about Google’s Chrome I can’t help but think, would Google’s V8 Javascript VM be a better choice for implementing dynamic languages like Ruby than the JVM ?
Some links
http://blogoscoped.com/archive/2008-09-01-n47.html for high level details
http://books.google.com/books?id=8UsqHohwwVYC&printsec=frontcover#PPP1,M1 this comic book goes into details about how they developed it and tested it and technical details about the new browser.
(Shallow Reader) So True
http://googlesystem.blogspot.com/2008/08/shallow-reader.html is so true, wish there was a reader that does not show how many things there are to read just let things flow like a tap, I should be able to open any tap and read as much as I want and close it off and then there would be no pressure to catch up.
What do you not like about agile?
Somebody recently asked me, “What do you not like about agile?”, I thought about it and here’s what I think.
My first pet peeve, this is not something wrong with agile, but more to do with the literature on agile and its proponents, they do not stress enough on the fact that this is not a buffet of practices where you pick and choose what practices you want to follow and discard others, just because they are inconvenient. And if you do choose to not follow all of the practices then please don’t call your self agile, you are giving the rest of us a bad name.
EX:
- You decide to “refactor mercilessly” but forget to write test cases or test before and after.
- You have no daily builds all the members of you team integrate just before the release.
- You have decided to no longer design/document anything and start hacking away code (without test cases or customer involvement or acceptance tests) you are not agile, you are in fact following the “Trial and Error” methodology.
Another example “Our development budget will run out at the end of the year so lets get all the development done in the next two months and during the maintenance phase add the unit tests”. Yes this is a real statement from one of my ex managers, no kidding. It took us a year to recover from this.
And then you hear complaints like “Why is XP not working?” well if you weren’t screwing around with it will.
2. Customer representative, Agile recommends that we have one customer representative who will be talking to the customers and talking to the team. What XP forgets to tell us here is this customer representative better be darn good.
Here is a real life example, I worked in a team where the customer representative role was played by the Team Lead, this team lead was previously a brilliant programmer so ofcourse he was promoted to a team lead and everyone assumed (ass-u-me) that he will also be brilliant in managing the customers/stake holders. Every weekly meeting he had with the stake holder was a mess. Our weekly goals depended on which stake holders attended the meeting, so we kept switching from one priority to another 6 months went by, we did keep giving releases every 2 weeks with bug fixes but non of the priorities ever got done.
When you have multiple stake holder/customer it is natural that there will be different priorities, but if we are constantly changing priorities every week nothing will ever get done.
I heard a talk given by Scott Ambler on evolving agile (which you can watch here ) this talk really drives home the point. When there are multiple stake holders there will be a lot of politics going on at that level. They may not have your best interest at heart!! Someone needs to manage the expectations and also when 2 customers want 2 different priorities, someone needs to step in and manage the priorities.
So there are 2 of my pet peeves with agile, I think agile is good (numbers don’t lie survey shows that 75% of agile projects succeed), but we can improve a lot by making somethings concrete like how you define an agile project, who should be in the role of the customer representative.
Introducing Jalds
Most of my friends already know this, just making it public I have been working on an open source project lately it is called JALDS (java algorithms and datastructures) it is a repo of reusable algorithms and datastructures. I see a lot of similar packages in C ( most notable LEDA ) but not in Java so this is my attempt to build one. Check it out at http://code.google.com/p/jalds/ its all in svn and uses maven.
JavaOne Thursday & Friday Highlights
- Probably the best session I have attended so far is the JavaPossie BOF, for those of you who don’t know what the JavaPossie is it is a podcast which is centered around java and I highly recommend it. I was very happy to finally see the show done in person.
- The day started off with a general session from Intel, like AMD, Intel too is working with Sun to optimize the JVM for there platform so with newer versions of the JVM it should work faster straight out of the box, without you having to do anything !! hey that’s the sort of performance improvement that I like 😉 they claim a performance improvement of about 60% on existing hardware just using a newer VM.
- Check out moblin.org , it is an Intel sponsored open source project. Also the atom processor, which is Intel’s smallest chip.
- The Garbage-First Garbage Collector or G1 for short is the next-generation low-pause garbage collector that will be included in the Java HotSpot virtual machine. G1 will be the long-term replacement for the Concurrent Mark-Sweep (or CMS) garbage collector, Sun’s current low-pause garbage collector ( Presentation )
- Scalable Non Blocking Data Structure, was presented by Dr. Cliff and all the code can be found on Source Forge the code is based on Lock Free algorithms. (Presentation)
- Performance talk, basically any component in your system can become a bottle neck from Disk IO, DB etc. best approach it to address one issue at a time.
- Pluse Live Scribe, was just too cool, it is a pen that runs Java.
- Call of the Kings, game done in Java.
- JMonkey a J2ee for games.
- Esper for complex event processing.
Annoyances
- To Sun: I came to JavaOne to improve myself and learn not for attending concerts, it would have been better if you spent the money on food. I was fed up of eating the same darn thing every single day !!
- Coffee only available in the morning !!!!!!!!!
- Half of the workstations disappeared on Friday
JavaOne Wednesday Highlights
- The day started off with a key note from Oracle, tons of new features and improvements have been added to JDeveloper, check out some of the demos, it has everything built into it and surprisingly the demos were pretty fast (as you may know JDeveloper is built on Eclipse platform and the more things you add to eclipse the slower it gets), whatever juice they added to it seems to work, very good for developing JSF based pages, one cool thing I noticed was when you are using JSF you can choose how the components will be rendered like SVG or Flash. Also has a bunch of SOA related helpers a rules engine editor, database schema editor.
- JRocKit is a 3rd party JVM, I heard about it a couple of years ago and didn’t pay much attention to it but it has now grown to be a very mature and good alternative to the Sun JVM for server side deployment. It comes from BEA which now is under Oracle, here is a white paper on JRocKit. It has extra functionality that help you debug latency and memory issues you can drill down into a running JVM and find bottlenecks in your code the eclipse plugin Mission Control can connect to a remote JVM and links to your code. I am not sure about this but I think you can get there own Garbage Collector which has tuned towards to real time systems, apparently the startup is longer but it is tuned for real time server systems.
- Oracle Coherence : “Oracle Coherence is a JCache-compliant in memory distributed data grid solution for clustered applications and application servers. Oracle Coherence makes sharing and managing data in a cluster as simple as on a single server. It accomplishes this by coordinating updates to the data using cluster-wide concurrency control, replicating and distributing data modifications across the cluster using the highest performing clustered protocol available, and delivering notifications of data modifications to any servers that request them“- more .
- Closures for Java, there are many proposals for it and BGGA is one of them they also have a prototype that you can download and start using. Do a google search and you will find a ton of stuff written on it. My 2cents it feels like putting a rear spoiler on a old Jaguar or Mercedes, these cars look real good if you want a Porsche (Ruby) just get one (Jruby), but I have not spent much too much time on it you have decide it by yourself. This maybe part of JDK 1.7
- Java Performance and Profiling tools : A nice presentation that gave overview of each of the tools.
- JMX update : New features that might be added to 1.7, Namespaces, Event service and annotations and query language. there will be one JMX Server per VM and everything else (like maybe your application server’s jmx server) will be registered under this one, this will be useful but I also think this could break some existing functionality like in Spring Jmx exporter. Event Service allows notifications to be received remotely. And a sql query like language to find the MBeans this was probably the one that got me most excited cause I really hate the way we now have to look up mbeans in a jmx console.
- AMD the closing note was from AMD, like Intel the latest version of the JVM will now work faster on the AMD chips I guess all the chip makers are working with Sun to improve the performance of the VM on there chips. The HotSpot engine optimizer will recgonize which family of chips it is running and will automatically optimize your code to that chip. They also released a plugin for eclipse called amd code sleuth that will tell you what your code is doing the on chip so that you can better optimize your code. I did not find any link to download this plugin, if you find it please post it in the comments, thanks.
Annoyances
Wifi totally sucks here, come on Sun this is a developer conference and your theme this year is Java+U so what’s up with the crappy WiFi. Even tiny conferences like MountanWest RubyConf provided better WiFi.

