Category Archives: Programming and Software

*ptr

C++ class starts tomorrow. Kinda psyched on it.

Also on deck, my first non-trivial .NET project.

It’s realistic to say that I will be using any / all of :
VB,VB.NET,C#,C++,ASP,ASP.NET,XML,SOAP,HTTP,OOP,OOD,SQL
at some point this week.

How about that for alphabet soup!

heh

my wish list

Rolf: We are so easily spoiled, we wants,

1) No installation concerns
2) Complete inter-application isolation
3) Full desktop application functionality
4) AND all the browser capabilities we are used to today.
5) Productivity

I would add:

6) Supports bluetooth
7) Enables grid computing
8) Comes with rich UI support
9) Fully HTML compliant
10) Deploys to watches, cell phones, PC, notebook, handheld, and mainframe
11) Requires less than 10KB to run, but scales up to support terabyte databases
12) Interoperates with everything using all available integration and messaging technologies
13) It’s free
14) It’s easy to learn
15) It’s future-proof

So, when you find that technology, let me know.

I am real programmer now

I have written my first C program! It’s about 100 lines, just a little command-line program. Takes 3 arguments, a path to a PNG input file, a path to a PNG output file, and a text string. It then takes the input image, paints some lines on it, and writes the text, and spits it out to the ouput file.

I used libgd which is a very easy-to-use graphics library which I was familiar with from my PHP days.

Thoughs on C after years of scripting and VM-based languages:
* It’s easy to use!
* Pointers are tricky, but not that tricky
* working the compiler and the linker is kinda tough, and docs on the web are few.
* It’s not OOP, so you have to get used to doing gross stuff like printing output from a function body.

DOT NUTS

So I went to Borders and got the VB.NET Deluxe Learning Edition™. I guess I have officially crossed over to the Dark Side™. Here’s how it happened.

As I mentioned a few posts ago, I have begun to do some non-web programming using VB 6. After about 2 weeks using VB 6 I realized that this was some potent shit. VB as a language is basically crap but VB as a platform is 100% geared towards fast & easy.

I made some GUI forms with VB and basically figured it was pointless to ride the learning curve on a dead product, so I decided to go .NET or bust on a new project I’ve got comng up.

VB.NET is a slick package. Within a couple hours I had made a trivial Web service, hooked a trivial ASP.NET page and a trivial GUI to it.

VB.NET allows you to consume a web service by typing a URL. The IDE generates a proxy class which makes the remote methods transparent to the local class. This is extremely nice and would certainly be useful in my current gig.

VB.NET also has the butt-easiest deployment – just publish to a web server via FPSE. It’s a button-push.

I’m still not 100% sold on this just yet. I have to admit that ADO.NET looks like another confounding database API™.

The acid test, for me, will be ASP.NET. Going from no class inheritance, flakiest typing and horrible scoping to what essentially is a “Real” programming language is gonna be interesting.

From my impressions of ASP.NET, it seems like the holy grail of instant webapps might be upon us. Will they be faster to build than with my current toolkit? I seriously doubt it – in the short term.

Also, I have FINALLY given up IE and am now using ForeFox !! IE Sucks!

COM-plaining

I’ve spent the whole weekend debugging a C++ COM object that:
– correctly returns “ABC123-34BGH” in WSH
– but returns “TTTTT-TTTTT” in an ASP page.

I asked around and some people thought it was a line in the source which de-allocated the return value almost immediately after creating it. I played with that piece but got nothing from it.

I crash-coursed some VC++ / COM but had a hunch that it was not the source but an install issue.

I learned:
* Some basic C++ stuff – pointers, memory de-allocation.
* What IDL is (COM thing)
* How to compile C++ to DLL’s in VC++
* How to use Component Services to register a COM+ component

The culprit was that it needed to be installed through Component Services as opposed to just using the command-line regsvr32. Still don’t know why.

Sassy B’s WWW Tech Predictions: 2004

Nothing like a little crystal balling to fill up space on the ol’ crap-wide web, eh? Here goes.

– Nothing much changes. The web remains an endless supply of crap occasionally tainted with quality information. Yours truly does little to change that.

– Despite the current outsourcing fears, little happens in the 2K4 to stimulate or depress the job market. Commodity coders continue to lose their jobs, top dawgs continue to hold out for six-figure salaraies that aren’t coming back. Those with reasonable wage demands and great soft skills clean up.

– Software dev finally gets hip to the fact that no one really cares about what language the software was written in. Old tech beats new tech in the 2K4. Old problems get solved really cheaply.

– Paradigm shifters take the biggest risks and post the biggest losses as everyone realizes that no one cares about paradigm shifts.

– Despite the Longhorn hype, .NET gains no more traction in the enterprise than it has for the past 3 years.

– Wages for scripters and other non-engineering software types continue to fall, but never enough to stop us from making a decent living. C programmers continue to make a decent living without having to constantly learn new stuff.

– Internal IT projects, office automation and business process automation become the holy grail of Web Developers as public web-site development falls straight into the hands of the marketing department.

– Small-scale Web shops continue struggle and fail as they attempt to transition from overpriced Design services to IT ousourcing. Ridiculous wages and incompetent staff are mostly to blame.

– XML camps struggle to keep traction as the reality that their products are immature sets in. Web Services and RSS are the exceptions, although the latter never commercializes.

– Markup and design camps struggle to re-tool their skillsets as public-facing Web production continues to become a low-wage job. Dreamweaver jockeys finally get their due.

– ASP.NET fails to revolutionize web development. ‘Classic’ ASP / VB remains entrenched.

– PHP jobs increase while PHP wages decrease.

– CFMX doesn’t sell, but regular CF stays put.

– Java sells, but no one really notices.

– Niche software from small shops continues to threaten big software from big shops. Again, no one cares what language it’s written in.

– Cheap wins.

– Finally, people with careers dependent on pure tech – but lacking any real engineering-level skills – move to management, master a business niche, or simply die.

XSL is Sucks

I had the opportunity to learn some XSL this week, and was quite excited to dive on in to this hot technology.

2 days later, I was all ready to write a full piece on XSL and how much of a stinking turd it is. But after some Googling, I realized I didn’t have to, because other people already wrote that article, 4 years ago:

XSLT, Perl, Haskell, & a word on language design [kuro5hin]
XSL Considered Harmful [xml.com]

So I’ll be brief:
* XSL is a programming language, despite what you may have been told.

* XSL Stinks. Stinks Bad. Really Bad. It’s hard to use. Really hard. It’s hard to read, too.

* XSL makes easy stuff hard, and hard stuff damn-near impossible. Try munging a string or date with XSL.

* XSL exists in the weird vacuum world where XML is the be-all, end-all problem solver. This world is called ‘The World where XML is something more than text files’

* XSL is a product of the “Markup Geeks”, who seem to think that programming in a markup language is a good thing. ‘It’s Turing complete!’ Right. That’s what matters to a programmer on a crunch deadline, Turing completeness.

* XSL is a W3C spec – more proof that the W3C has gone completely bonkers.

* Pick a programming language – any programming language – and accomplish the same task in 5 minutes, in 5 lines, as a whole gob of XSL does.

I predict the quiet and unceremoneous death of XSL in the near future. Look at ASP.NET, Smarty, JSTL, CFML, Mason, Freemarker, or any simple template class to see why.*

* Hint: You can transform XML in damn-near any programming language – Javascript, Flash, PHP, etc…

Peahen

I finally got it together and learned the Java web stuff. It took a long time for me to get things working, but now I’ve finally figured it out.

I battled a lot with Tomcat – some tweaks to the startup script and a lot of Google digging helped in a huge way. Don’t forget to uncomment the invoker servlet!

Once I had written some servlets and started running them, it dawned on me how ‘close to the protocol’ you can get with this tech.

Next step was to start checking out frameworks. Of course MVC is all the rage, so I made sure to check out Struts

Struts is an interesting beast. Once you’ve built web apps for a while, you tend to start re-solving a lot of old problems. The frameworks usually offer a structured way to handle sessions, user auth, and data input validation in a consistent way.

There are some elements of Struts which look appealing, but I can’t say I like the look of the JSP view templates – perhaps I should check out Velocity or Freemarker instead.

All this flexibility comes with a moderate complexity tradeoff. Unlike ASP.NET, which offers you ‘The Right Way’ to do things, the possibilities are quite open on the Java side of things.

Anyway, here’s my tips for a budding Java web guy:

1: Get familiar with the servlet container. You will see all sorts of examples on how to write a servlet, but very few on how to run em’. Read those docs. You’re gonna play admin anyway.

2: Master setting Environment variables on your system. You will need to set these constantly unless you get it straight.

3: Learn the ‘manual way’ before letting tools do it for you. Before you whip out Eclipse and Ant it helps to understand how it’s SUPPOSED to work 😉