This may be an embarrassing thing to admit, but I was momentarily stumped this morning when I had a need to iterate over the English alphabet with Java 1.5 ... I've been a Sun Microsystems Certified Java Programmer for 3 years now, yet this little thing got me!
Well, here's my solution, which I'm posting up now in hopes that someone with the same need may do a google search and find this post =)
char letter;
for (letter='a'; letter <= 'z'; letter++) { System.out.println( letter ); }
Simple, right!?
If you find this helpful, please leave a comment and let me know!
Monday, October 6, 2008
Wednesday, July 23, 2008
MyEclipse 6 HTML Editor!
My Adobe DreamWeaver CS3 subscription expired the other day, and only moments before having to deal with an urgent client request for a website change. This was nothing server-side related, just a static change to a page.
3 years ago, I would have popped open a MS Notepad and made the change within the archaic wall of text presented to me by an ancient ANSI editor... But I've grown enough since then to learn that being efficient with a tool is far more important than being cool enough to work without a tool.
So, in my limited amount of time, I scrambled for a quick way to make my change with a tool, but without DreamWeaver. I forgot I had installed MyEclipse 6.0.1 on my machine months ago, but noticed it when right clicking on the file needing editing...
"Edit with MyEclipse 6.0.1 HTML Editor" ... Hmmm... Sure, I'll try that.
BAH-DA-BING! An exact wysiwyg representation of my page popped up and displayed my page more accurately than DreamWeaver ever did. The wysiwyg lacked a lot of the common shortcomings which most suffer from. I was so impressed by how smooth this tool was, that I went on to develop my next client's entire website in ME 6. You can see that work at motion-limo.com.
In conclusion, I have found that ME6 makes a better Visual HTML Editor than DreamWeaver does, even if it does lack some of the easy FTP features and things which DreamWeaver offers. I'll be saving my money from here on out and sticking with ME6!
3 years ago, I would have popped open a MS Notepad and made the change within the archaic wall of text presented to me by an ancient ANSI editor... But I've grown enough since then to learn that being efficient with a tool is far more important than being cool enough to work without a tool.
So, in my limited amount of time, I scrambled for a quick way to make my change with a tool, but without DreamWeaver. I forgot I had installed MyEclipse 6.0.1 on my machine months ago, but noticed it when right clicking on the file needing editing...
"Edit with MyEclipse 6.0.1 HTML Editor" ... Hmmm... Sure, I'll try that.
BAH-DA-BING! An exact wysiwyg representation of my page popped up and displayed my page more accurately than DreamWeaver ever did. The wysiwyg lacked a lot of the common shortcomings which most suffer from. I was so impressed by how smooth this tool was, that I went on to develop my next client's entire website in ME 6. You can see that work at motion-limo.com.
In conclusion, I have found that ME6 makes a better Visual HTML Editor than DreamWeaver does, even if it does lack some of the easy FTP features and things which DreamWeaver offers. I'll be saving my money from here on out and sticking with ME6!
Friday, March 7, 2008
HIBERNATE!
You've got fictional objects, in an abstract world. It is these very abstract objects, conceptualized in your mind and painted onto your canvas known as RAM, which holds all the key data of your application.
What is your user? An OBJECT!
What is their car? An OBJECT!
What is their login date? An OBJECT!
Their address?? OBJECT!
But how do we turn these abstract thoughts in memory into persistant physical data?? KABLAMO - HIBERNATE! Hibernate says "Give Me You're object, I'll store it away, and you just let me know when you want it back."
Hibernate maps to any popular database, even if only remotely popular. So far I've mapped to Oracle, MySQL, and HSQL. Sometimes even simultaneously, although not in a managed environment.
Now I've got ambitions of using some reflection to develop my own ORM. It just sounds fun. If I were to developer my own ORM, I'd name it:
What is your user? An OBJECT!
What is their car? An OBJECT!
What is their login date? An OBJECT!
Their address?? OBJECT!
But how do we turn these abstract thoughts in memory into persistant physical data?? KABLAMO - HIBERNATE! Hibernate says "Give Me You're object, I'll store it away, and you just let me know when you want it back."
Hibernate maps to any popular database, even if only remotely popular. So far I've mapped to Oracle, MySQL, and HSQL. Sometimes even simultaneously, although not in a managed environment.
Now I've got ambitions of using some reflection to develop my own ORM. It just sounds fun. If I were to developer my own ORM, I'd name it:
stORM
Thursday, February 14, 2008
Ajax - the cons!
As a web application developer, I've finally matured past the initial googly-eyed excitement that Ajax brings. I don't think I need to enumerate the pros of AJAX technology, as it is this very excitement which turned a javascript-hack into a contemporary web application paradigm.
However, I would like to enumerate the cons. The browser, in which all web applications run, has many basic functions which all users have become familiar with. More importantly, these are functions which many even rely on.
These are all tools your browser provides by keeping track of your location in a website, and where you navigate to. But, what if your browser isn't aware of any of your navigation? All of your navigation was asynchronous, and all of this important work you've done existed within a
However, I would like to enumerate the cons. The browser, in which all web applications run, has many basic functions which all users have become familiar with. More importantly, these are functions which many even rely on.
- The Back button
- Whether you made a mistake, or are moving through a search list, you need your back back button.
- The Refresh/Reload button
- You need to refresh your current content for many reasons. Maybe you're waiting for a message in your inbox, maybe you're testing changes on an individual page. Maybe the complex web application your using is hanging up and you simply want to recapture your current view.
- Bookmarking
- URLs are hard to remember, and even harder to remember how you found out about them in the first place. Bookmarking is the solution.
These are all tools your browser provides by keeping track of your location in a website, and where you navigate to. But, what if your browser isn't aware of any of your navigation? All of your navigation was asynchronous, and all of this important work you've done existed within a
element somewhere on your page. What if you need to refresh, bookmark, or "go back" now? Well, then you're just S.O.L.
Is it worth it?
A slice of AJAX here and a dash of AJAX there, only when appropriate, can bring fun and richness into an application without breaking the browser tools your users need. A whopping portion of AJAX dependency can not only richen your user's experience, but also crush it. How far you want to take it is your decision, but I'll be avoiding the double edged sword.
- The "Back" button will likely try to exit the current website altogether and bring you to your previous website.
- Your "Refresh" button will refresh the entire page to it's original view, regardless of what important tasks you accomplished asynchronously within a block level element on the page somewhere.
- Your "Bookmark" will behave similarly.
Is it worth it?
A slice of AJAX here and a dash of AJAX there, only when appropriate, can bring fun and richness into an application without breaking the browser tools your users need. A whopping portion of AJAX dependency can not only richen your user's experience, but also crush it. How far you want to take it is your decision, but I'll be avoiding the double edged sword.
Subscribe to:
Posts (Atom)