3 posts tagged “programming”
I've been thinking about getting back into GUI programming (all I've done for about the last year, barring one small VB.NET project) is all web and scripting. I've also been thinking about picking up a new language but with the plethora of choices available now I'm at a loss on what to pick. Maybe you guys out there can help.
I'm fairly decent with VB.NET, live in PHP, and can understand C#. I've got a little experience in C++ but it's been so long since I've done any actual coding (and never anything GUI with it) that it would be just like learning it again (I'm purposely leaving out that I know COBOL and RPG...... crap). I want to learn something that is multi-platform to boot.
If anyone has any ideas, let me know. I'm looking at Python, but honestly, I have no idea where to go.
I have become a convert of the Ajaxy goodness that comprises Web 2.0. I've held off getting into Ajax since I'm pretty much against javascript. It's a pain to implement something in javascript, which may not work correctly in all browsers without extensive testing, it's finicky, and just a pain to write and maintain. To top it all of, what can't I accomplish in PHP that javascript won't do? I know PHP better so I'll build it quicker that way than with javascript.
One thing that I stumbled upon was xajax. xajax is a PHP wrapper for ajax functionality. What this allows a person to do is write PHP code for what they would like to happen, but then have it all tunneled through javascript without having to write a ton of javascript.
For example, let's say that you have two select boxes. When you make a selection from A, it changes the options in B. We've all seen this before. Now, imagine that B constantly changes and all of the options are stored in a MySQL database. One option is to learn Ajax to do all the altering for you. That can be a lot of javascript. The other option is with xajax. You can write a PHP function that does the same thing, and xajax will take care of turning it into Ajax for you!
xajax is currently at 0.2.4 and works pretty well. I've only had one project that doesn't work at all, and I'm sure that's because I'm doing something wrong. I've used it, as well as the SVN version (which is like beta 0.5.x) on a few different applications and it's worked great. I'm not using it for anything gigantic, but I'm finding little things in my applications that are benefiting from it.
If you do PHP development, xajax is something to look into if you want to get your feet wet with ajax without having to learn a new language.
At my job, one of the things that I have to do is some RPG (some 3, some ILE, some a mixture of both) since I actually know some RPG. The program that I'm working on right now was created back in 2002. Yes, they still coded in RPG in 2002. And in 2006. *sigh*.
Anyway, looking over this code reminds me why I hated RPG in school. RPG is already confusing in the first place with it's many restrictions as a fixed-field programming language (everything has a specific column it must appear in, and can only be X characters long depending on the column), but it gets worse when you start mixing syntax from one generation of RPG to another.
Syntax
As an example, FOR Loops appear in two different styles:
Style 1
VARA IFNE 'Stuff'
VARA ORNE 'OtherStuff'
...
Style 2
IF VARA <> 'Stuff'
or VARA <> 'OtherStuff'
...
Let's pick a standard and stick with it people! You're updating sections of code already, why not fix the FOR loops?
Variable Naming/Comments
The other thing that stinks about RPG is that your variable names can only be a certain length. Therefore you end up with very heavily abbreviated code names (and the dreaded 'A' as an counter variable). You are then forced to rely on comments. I love commented code, even if the code itself is nice and to the point with proper variable names. I hate when someone puts in comments, something gets updated, and the comments don't reflect the change. A confusing language's readability hinges on good commenting, and it really wastes time when the comments are wrong.
SEU
I also am programming currently in the Source Entry Utility on the iSeries. It's like being in DOS in respect to the screen resolution for the terminal. I have learned that there is an IDE that we can use, and I will be asking for it. I'm a modern programmer, give me at least Notepad. At least it supports more than 80x25 resolution.