Despite the fact that there are plenty of free languages and development tools available online, there is still a much larger barrier to entry for someone who wants to get started as a programmer compared to nearly 30 years ago. I have fond memories of the computing of the 80s so I thought I’d take a quick trip down memory lane and write about my personal exerience of becoming a programmer. It may also be of interest to those familiar only with the Silicon Valley version of the history of computing since this covers events from the other side of the pond in the UK. When historians talk about the history of computing, they really only cover things like the TRS80, Altair and rise of the PC and Mac, yet there were many important and competitive developments in Europe that are often not included as part of this history.
I was trying to fade in a Primefaces panel component that was initially hidden and found it to be somewhat of a struggle. After a bit of googling, the only thing I found out was that I wasn’t the first to come across the problem. Here’s the basic JSF code to use an effect on a panel in response to the button click.
<p:button id="showme" value="Show Me" onclick="return false"> <p:effect type="fade" event="click" for="myPanel"/> </p:button> <h:panelGroup layout="block" id="myPanel" style="display:none">Show Me</h:panelGroup>
This code does nothing because by default the fade effect fades out the component. Looking at the options for the fade gives us no clues either since it claims there are no parameters. The solution is to provide a
mode parameter that can be either
hide which is used for most of the effects. In our case, we want to
show the component.
<p:button id="showme" value="Show Me" onclick="return false"> <p:effect type="fade" event="click" for="myPanel"> <f:param name="mode" value="'show'"/> </p:effect> </p:button> <h:panelGroup layout="block" id="myPanel" style="display:none">Show Me</h:panelGroup>
This will show the panel that was initially hidden when you click the button. The only nagging problem is that the button retains its hover style until you click elsewhere in the page.
There’s still a lot of confusion over the difference types of managed beans provided in Java EE 6 with EJBs, CDI beans and JSF managed beans all being available. This article aims to clear up some of the differences between the them and define when to use them. Read More »
In this second article on implementing Spring MVC in Java EE 6 we’ll take the metadata we extracted in part one and use it to invoke request mapped controller methods in response to web requests and then direct the user to a web page based on the result of the method. Read More »
One of the opinions I’ve had over the last couple of years is that Spring makes things look really easy, and CDI is a great dependency injection framework. Throw in this article suggesting you can build your own Java EE 7 and it sounds like a challenge, so for fun, I thought I might have a go at implementing a subset of Spring MVC on top of CDI with Java EE 6. Read More »
So I’ve been meaning to make a fix in one of my projects for a while, and I haven’t touched the code in over a year, so of course I have to go back and really get back up to speed with the code. The change was for the Datavalve project and it was to include support for passing in collections and using
in SQL Statements, so now you can use something like :
provider.addRestriction("item.statusCode in (:param)", stateCodeList);
This will cause the list of codes to be expanded into an
in SQL statement including checking to exclude null items, and as usual, the restriction is not included if the code list is null or contains only null items.
So I have two problems, the first is getting back up to speed on my code, figuring out where the make the change, and making it. The second is making sure my code changes don’t break anything thats currently working.
For the first problem, I decide to create the unit tests first so I can verify that the change does as expected. Obviously, the tests fail initially, but by looking at the code executed by the tests, I can start to pick out places where I need to start looking to add the new code. After all, tests measure the correctness of the state after the code has been executed. What better place to start looking than seeing what code the test executes. After finding the method that I need to change, I make my code changes and run my tests. All my original tests pass with flying colors, but my new test fails. I take a peek and sure enough I left off the last line of code to add the built object to a list. I put it in, and I have all my tests up and running.
All in all, I’ve made a large change to some sizable (12K+ LOC) code that I haven’t seen in over a year, verified that the change works and that it hasn’t impacted any other code. Not bad for an hour.
So I’ve been on a bit of break from blogging, I’ve had lots of things going on, I’ve moved house twice, and changed jobs a couple of times. I’ve not even really been checking my email that much (as evidenced by the fact that I didn’t see my hosting invoices and the subsequent temporary suspension of my blogging web site). I’ve been spending time with the family over summer and taking a bit of a break from the extra-curricular IT work. I’ve also been doing some thinking on which direction I want to go in my career. Because of all this, If you’ve emailed, or sent a LinkedIn request that I’ve done nothing with, that’s why. However, things have been hotting up in my absence so there’s certainly a lot of topics to delve into.
I haven’t been writing for a while since I’ve been busy working on several things right now.
First off, after a few months of job hunting, I’ve changed jobs, I’m now doing some Java contract work down in Pittsburgh. After 11 years at my old job, it was time to move on. The great thing about contract work is the opportunity to work on a lot of different projects in a lot of different places. After being stuck in Cleveland for 11 years, we are ready for some changes.
I also want to try and get into doing some more Java EE 6 and CDI training. A lot of people are unsure of how it is all meant to work together and are missing out on the real beauty and simplicity of working with these frameworks.
Rick, Rob and I have been doing some more work with CDISource and anticipate a release of our source in the next few weeks. Once thats out, I want to start playing with some of the Seam 3 stuff especially with regards to CDI. We announced CDISource and then all of a sudden we all got busy with different things, and we have some code we want to release for which we have a number of articles to write.
Between moving, unpacking, starting a new gig, which always fries the brain for a few weeks, and having my Mum over from Manchester,England, I haven’t really been having time to write or work on projects.
I have a new release of the Knappsack almost ready to go which includes Spring based archetypes and also a Java EE 6 EAR archetype as well as a couple of new posts.
For most of us, as programmers, we are a pretty lucky bunch. We get paid handsomely (or at least nicely) for doing something which we enjoy, will never go out of fashion and provides a great deal of benefit to the companies we do it for, if not the world at large. While we may not be working in the IT fields we want to be working in or for the companies we want to be working for, we still get to enjoy the process of writing code on a daily basis for a living.
Read More »