Multithreaded programming is supposed to be perilous. Even for experienced practitioners who are familiar with the concepts of multithreading, the cognitive load of this work is supposed to be too taxing for the human mind to handle reliably. Yet your typical server-side enterprise Java application is inherently multithreaded. Whether deployed on a full Java EE application server or something lighter like Tomcat, your typical application runs in a shared process space with hundreds or thousands of threads. Somehow, we manage to release and keep in production real working applications. And truth be told, in all my years as a programmer very few bugs I encounter actually has anything to do with multithreading logic.
Saturday, September 29, 2012
Monday, August 13, 2012
I have grumbled before about the trend away from private offices towards cubicles and open plan offices. At the same time, there are people who genuinely prefer these offices, which I considered inhumane. Then I read a book: "Quiet: the power of introverts in a world that can't stop talking", by Susan Cain. It helped clarify the differences between introverts and extroverts, the rise of the latter, and the implications all this has on workplace productivity.
Cain's definition of introversion and extroversion is pretty much what you would expect if you are familiar with Myers-Briggs. She emphasizes that "introvert" does not mean shy nor anti-social. Rather, an introvert tends to focus on the inner world of thought and feeling, enjoys solitude, dislike conflict and focus well. An extrovert would be the opposite, focusing on the exterior world and social interaction, are comfortable with conflict and enjoy multitasking. Another way to look at this is to say that introverts are more sensitive to outside stimulation, such as noise or people, and thrive at lower levels of such stimulation. Conversely, an extrovert needs a greater intensity of stimulation to feel "right". An introvert needs solitude to recharge after experiencing elevated levels of stimulation. An extrovert is the opposite: he recharges with social interaction.
The difference between introverts and extroverts -- keep in mind this is a continuum rather than a binary distinction -- in terms of optimal stimulation levels helps explain work environment preferences. An introvert works best in a relatively quiet, distraction-free environment, such as a private office. An extrovert is energized by the constant social interaction of pair programming and the bustling activity of an open plan office.
Thursday, August 2, 2012
AppFog sent out an email announcement a couple of days ago that made my jaw drop. AppFog is one of the commercial implementations of the open source CloudFoundry PaaS (Platform as a Service). I blogged briefly before about CloudFoundry: it's one of the new generation of PaaS that do not lock you in with vendor-specific APIs. You can provision a standard DB service, upload a war and watch your application go live.
So AppFog is a commercial offering of an open source PaaS over generic public infrastructure: sounds about as generic as it gets, right? The difference is in their business model: calling themselves the "GMail of PaaS", they intend to shake up the market in the same way. Remember GMail? It arrived as a free email service with virtually unlimited storage. Suddenly, the idea of a paid email service seemed ridiculous. AppFog's announcement is comparable. The part of the announcement that made my jaw drop is the price: free for an application with 2GB of RAM, 1GB of DB storage and a 50GB transfer limit. By contrast, Jelastic's prices at ServInt work out to $14.40 per 128MB per month. The next step up is a $100/month plan, but the free plan alone is so generous many users won't need anything more. AppFog could kill the VPS market altogether.
There are details I'm still not clear about. For example, the default infrastructure is Amazon's AWS: is the disk storage the EC2 ephemeral storage that disappears when an instance shuts down or is that EBS or S3? Of course, you also have other infrastructure options: HP's OpenStack, Microsoft's Azure (no Java) or Rackspace. Moreover, I'm still skeptical about how AppFog intends to make money. They made vague noises enterprise customers, but the fact is their free product will be very popular. And while AppFog will not charge you money, AppFog itself still has to pay Amazon for the infrastructure. Still, why look a gift horse in the mouth? One thing is for sure: the PaaS market will not be the same again.
I heard again today from my employer that we still really, really need software QA engineers. This has been going on for quite a while now. I realize that good tech talent is often hard to come by, and newer skills like HTML5 and mobile are red hot. But SQA -- while obviously an important position -- has been around for a long time, yet we've had a hard time hiring them. Is there something in the Boston tech scene that is sucking up all the QA talent?
Tuesday, July 31, 2012
I have mentioned in previous postings that I had been working on a Grails project, but neglected to actually say what that project was. Jelastic not only hosts this project on their PAAS cloud, but Judah Johns of Jelastic was kind enough to interview yours truly on their blog:
Now that My Hometown Video (HTV) is out there, it seems unnecessarily bashful to avoid blogging about this project. HTV is the brainchild of my client, Rob Roddenberry, who wanted a way for communities to form around towns of interest. Perhaps you might be nostalgic about a town you grew up in, or would like to tour attractions (parks, beaches). That's where HTV comes in: to provide location-centric videos and discussions. A longer explanation and more screenshots are in the Jelastic spotlight link above, but the best way to check it out is to visit the HTV site.
This has been a fun project. While I have a day job building enterprise Java applications, this is one site that I could sort of call my own. It really belongs to Rob, of course, and is entirely his idea. But it is satisfying to be get to do "everything" at the technical level including UI, server, DB, provisioning, deployment and operations. Grails has been fun to work with, and I find it interesting that every single Jelastic Spotlight application up to HTV has been a Grails app. The presence of public APIs like Facebook's and easy-to-use PAAS offerings like Jelastic has made such applications so easy to turn into reality.
Sunday, May 27, 2012
ORA-00001: unique constraint (FOO.SYS_C003567231) violated
The constraint is system-generated, based on UNIQUE being specified in the DDL, so the name is unhelpful. With no other information, finding the affected table can be difficult. You can query for the table with the following SQL:
select constraint_name, table_name from user_constraints where constraint_name='SYS_C003567231
This is a handy query to know, so I'm noting it here for my future reference. It's also described in a number of other blogs like this one.
Thursday, May 24, 2012
In my last blog post, I lamented the slow turnaround and overall heaviness of enterprise Java development. I also said that I would be checking out JRebel, a tool designed to let you make code changes and push them out to a running application without restarting the application. My verdict? I loved it, convinced my boss to buy it, and am an enthusiastic user. But it is not flawless, so adopters should keep expectations realistic.
Sunday, February 12, 2012
In his classic "No Silver Bullets" paper in 1986, Fred Brooks claimed that the "accidents" of software development had been substantially addressed. He used the word "accident" in the Aristotelian sense, meaning tasks not inherently essential to programming like waiting for a program to compile. We were getting close to the being limited only by the essential tasks, where the limit is the human mind. I wonder how he might amend his views had he known how enterprise Java would introduce one bad accident after another to the profession. Fortunately, I think things are turning around.
The contrast between accident and essence came into sharp relief to me recently because of two things that happened one day. The first was when a colleague mentioned to me that he had wasted half a day trying to get Maven to build our application. He wasn't changing the build system: all he wanted to do was check out the latest code, build it, and work on it in Eclipse. This took literally hours to get working. The second thing was that I had been working on a personal project based on Grails.
Monday, January 9, 2012
The Facebook platform offers a great deal of functionality, and I have been using it recently for user authentication and management for a web application. Last December, Facebook implemented their mandatory migration to OAuth 2.0, causing breaking changes for those of us naïve enough not to monitor their blog. As part of this migration, they changed both their cookie format and policy, which will make life more difficult for server-side developers.