The Dopefly Tech Blog

« The Dopefly Tech Blog Main page

React is Harmful - 25 Reasons Why

posted under category: General on January 4, 2023 by Nathan

I don't apologize for the clickbait title. I've worked on the web for over 25 years now. I've seen a lot of things come and go. I've seen good technology and bad, both win and lose.

Over the past handful of years, I've become less and less of a fan of React. The more I think about it, the more I believe that React is the worst popular framework (sorry, "LIBRARY") that exists. Let me explain why.

Prologue

React has been wildly popular ever since the Facebook engineering blog posted their first articles about it in 2013, explaining the need for state-driven interfaces and the flux data pattern. Ever since, React has been a pioneer in the lightweight JavaScript component framework space, incubating a lot of new ideas. React is so popular that it even makes job-hunting easier - when you read "React" in a job post, it signals a difference from the older generation of jQuery JavaScript apps.

I first learned React in 2016, when I was hoping to find something to replace jQuery - something that would let me add HTML templates in an integrated framework without another library like Mustache or Handlebars. Those were the best things I knew about at the time, though Angular would have probably sufficed. I was given the perfect application to branch out and try new things - an easy lay-up for a capable JavaScript framework. It seemed like everybody at the time was talking about React, so I should try it.

That's when I was blindsided by npm, node_modules, 8-trillion javascript packages that were all 2kb, and then the big ones - Babel.js and Webpack. I backed off and did it my own way for this project.

A year or two later, I found Vue.js, which actually solved all of my problems with React at the time. The following year, I was handed another project written in React. It was a SPA. I studied and learned, and I expanded it and helped stabilize what we had built, experimented with it a lot, pushed it to its limits, decided what I liked and did not like, became a company expert in React, and then realized that so much of it was too brittle to change and grow in a meaningful way, plus I... had the time... so I rewrote it in Vue - it took 7 days (even though thought I could do it in 5). Everyone loved the result.

The next year, I found myself with another React app, this time a much larger app with a team of developers and years of history. At first I was happy to nurse it along and add features until I got reassigned somewhere else, but then I started to notice the underlying issues. This one had serious architectural problems, reactivity problems, complexity problems, and performance problems, plus new features that would not be easy to add on. We decided to rewrite it, and I pushed my preference for Vue.js on the team. It took 6-9 months, but we made something scalable and capable that is much easier to work with. I will admit that most of my interactions with React have been bad applications, so that's where my rant really begins.

1. React is bad by default. A successful React application must be backed by very experienced developers. Newcomers aren't likely to fall into the "pit of success" - it's more like mountain climbing - you have to prepare, you have to bring a guide, you have to study your approach step-by-step. If this is your first time on the mountain, you won't summit.

2. React has a doctorate-level vocabularity. "Immutability" "Memoize" "hydrate" "Pure Component" "UseEffect" "Synthetic Event"

These are words come directly out of a DCS degree program but don't make sense to non-doctoral, even native, English speakers. It's not that this is hard to understand these words and concepts, it's that it's unfriendly - hostile even.

3. The Lifecycle Event vocabulary is just stupid. I'm glad that we have mostly done away with some classics like ComponentWillReceiveProps which was infinitely confusing, but shouldComponentUpdate or getDreivedStateFromProps - what are we doing here? To contrast, Vue.js simply has beforeMount and mounted, beforeUpdate and updated, and so on, while Svelte has onMount, onDestroy, beforeUpdate and AfterUpdate.

4. Hooks are yet another brainiac term that are contextually unclear. Hooks somehow simultaneously do everything and nothing. They replace state and they are the new event system and they are the easier way to cache things and they are the best way to debug everything. But how do they work? And why? Only little explanation is given.

5. Why do hooks have to be the first thing in a component? This feels like a code smell that indicates poor design.

We're going to hear this a lot: Let's compare it to Vue. Vue implemented a hooks system, but they took out the odd placement requirement - you can put them anywhere in Vue.

6. When we add Redux, we add more vocabulary problems, specifically the way Redux redefines words incorrectly, for example

  • Action - A tiny data structure that doesn't do anything (not an actual action)
  • Reducer - unintuitively, changes the state (immutably)
  • and Dispatcher - a useless convention to do a switch/case with actions for some reason

7. When we use Redux, or any state mangement library that loosely follows the Flux pattern, immutable state creates many copies of our state in-memory. A lot of state changes at one time will run up our memory usage very quickly and cause additional garbage collection, which may happen at any time, and can affect the performance of our applications.

While an immutable state avoids a number of problems, and may solve some very complex concurrent data issues, a large immutable state is a problem on its own.

8. If we added Redux to an app before 2020, we absolutely need to have added Thunk and Saga for asynchronous operations, then Reselect to "memoize" (or, cache) the Selects from the global state, plus Immer to shrink our reducers' scope. None of this is documented of course. None of this is official. You'll only see it if you read the right blog on the right day, but this information is basically required if you want your app to work the way you expect it to.

9. If we added Redux after 2020, we would absolutely need Redux Toolkit (unless you're a sadist), which of course has its own additional vocabulary.

  • A Slice - sort of a module of the state with selects and reducers all-in-one
  • AsyncThunk, EntityAdapter, I'm not even sure what these are

Redux toolkit makes Redux a lot more manageable but adds more overhead, both physically (in bytes) and mentally.

10. Redux, and all flux-patterned global state management systems add an incredible amount of complexity.

Complexity adds bugs, so this is a simple formula: reduce complexity to remove bugs. Remove Redux to reduce complexity. Therefore, remove Redux to make better applications.

But of course we need some kind of global state management. Therefore, we should all be looking for the simplest solution to reduce our bugs. Even though Redux is the most-default-looking choice, we should shop around. Instead of Redux, try MobX, or Recoil, XState, Hookstate, Akita, ClearX, Rematch, or any of the, roughly, 50 different great choices available.

11. And that brings us the problem of choice. React has no default path to success. There are no "easy" decisions. Every choice presents fifteen options, none of them advantageous over the others; every library needs seven more; each choice Fractally branches out to infinity, with options forever.

12. React is bloated.

  • If you add React + React Router + Redux + (reselect+thunk+immer) + React DOM, you get about 300kb of framework files
  • If you do the same for Vue, which BTW is just Vue + Vue Router + Vuex, it's only 100kb
  • If you do it for Svelte, it's essentially 0kb (not in reality, but Svelte is like a kind of magic)

13. React carries around features that only Facebook wanted to add. For instance, no one else was interested in...

  • "Concurrent Mode" - billed as interruptable UI re-rendering
  • "Portals" - Which I think finally went into production; it renders a component somewhere else in the page
  • "Transitions" - Which are supposed to help with loading new content
  • and "Suspense" - Which creates a framework-preferred way of building a "loading" state for components

14. React is slower than Vue and Svelte and a number of other comparable, very capable choices. It uses more memory. It takes longer to start up. This is measurably true in Stefan Krause's "JavaScript frameworks benchmark" which he publishes every month-or-so, in sync with Chrome updates.

Don't freak out, React is still fast and it does a lot of things well. It just isn't the fastest, most powerful, most scalable thing out there. Not by a long shot.

15. React-DOM is a separate library. Imagine me, a veteran web developer, attempting to add React to a web page. Yeah. It turns out React doesn't do anything unless it can interact with the DOM through a second library that weighs in at 20x larger than React.

I do understand why it's separate - it's because the external-facing parts can be swapped out to interact with something that's not a web page, such as a mobile app. That doesn't excuse the fact that this is confusing, unintuitive, and probably not the best solution possible.

16. I can't just add React to a web page. I would have to add React, and React-DOM, and then a way to translate JSX to HTML and React to JavaScript, so that requires Babel.js plus a huge bundle of plug-ins specific to React and JSX. They say you can do this in under 10MB but I've never seen it done in under 30MB. Imagine serving a 30MB JavaScript application only capable of outputting "Hello World!"

The reality is, we also need Webpack to bundle and serve our React app, and the easiest way to do that is through the React CLI. To contrast this, by the way, we can add Vue to a web page with a script tag like jQuery and just start using it.

17. The React CLI is powerful, but limited, and breaking out of those limitations requires us to eject our applications from the CLI. Ejecting from the React CLI is a one-way operation, and it leaves us with a 2MB (or more) webpack.config file - these are usually around 1-20kb - this 2mb size is unmaintainable and impossible to work with. While it could be a testimony to how much React CLI is doing for me under the hood, the reality is that it's inconsiderate.

18. Code-splitting is a nightmare. Who of us have attempted to split our webpack chunks with React? Code splitting is an amazing performance enhancement that can cut down the initial download and processing our users have to go through, letting them download the rest of the app as they explore it. And for some reason, this was hellacious for me, multiple times, in multiple applications, over multiple years. This caused big problems trying to make my React applications more scalable. Again compared to Vue: Vue makes this trivial.

19. With React, you either choose JSX or pain. No one in their right mind would code an application with React.createElement() instead of JSX. A lot of the benefit of React is the way that JSX integrates. JSX is the default templating engine, the only templating engine, and there are no other choices. It feels like an OK thing because JSX is passable, but it also feels a little bit like vendor lock-in. Switching templating engines is not something that people do in React, however it's something we can do in Vue, and in a lot of other frameworks.

20. The reason I bring up our inability to switch from JSX is because JSX sucks. For instance:

  • To add a CSS class to an HTML element, we have to call it className="" - this is the cause of a lot of errors I've seen (and caused).
  • Similarly, the <label> tag's for element is illegal, we have to call it htmlFor - it's ridiculous to me that HTML is invalid by default.
  • JSX is XML. I thought we fought the good fight and squashed most of the XML in the world, but here we are again.
  • CSS with JSX is such a problem that there are 63 CSS-in-JS frameworks for React!

21. React state properties are not really "reactive." When we change the state through an official means, like setState or through a useState hook, React re-builds the entire component, and potentially the component tree. Of course virtual DOM will keep the screen painting as small as possible, but still component re-rendering can be expensive. Instead of saying that properties are reactive, I would say that state changes in React are overreactive. Again, when we compare this to Vue, every state change is immediately, minimally, and truly, reactive.

22. In 2017, a potential change to the React "OSS" license could have allowed Facebook to revoke the ability to use React to anyone they wanted; imagine writing 6 million lines of code in React and then being told we can't use it anymore because someone violated their policy. That's a game over. It's a bankruptcy waiting to happen. Of course FB recanted the whole idea, but there's still a strange potential for something like this, isn't there?

23. The Other Facebook Dilemma - if Facebook wants to change something in React, they just will. Companies - even huge ones like the one where I work - have no say in the matter. Conversely, if you need a feature changed in React, it's not likely to happen.

If you need a feature changed in a smaller ecosystem like Vue or Svelte, I guarantee that a healthy donation can move a lot of code.

24. I dislike how so many JavaScript programmers, especially those less experienced, treat React as if it's the only way to write JavaScript now, like there's never been another way. Does anyone remember how annoying it used to be that every JavaScript answer on StackOverflow started off by suggesting jQuery? We are close to a similar place with React today.

I do not want less experienced programmers to think React is the way JavaScript works, or the way all programming works. The world is so much bigger than React. React is not the best choice for most things, and I hate seeing people choose it without thinking through the options. You can do better. We can all do better!

25. We tell new developers that JavaScript is easy, then we give them React, which feels kind of easy, but then they get NPM, JSX, Redux, Typescript (which I actually do enjoy but the ecosystem of adding a transpilation step to JavaScript is a big one to swallow). JavaScript really should be easy, and React really is the opposite.

Epilogue

I think we all owe it to ourselves, and especially to all the new programmers out there, to stop choosing React as the default. There are plenty of occasions where it may be a good choice, but I don't think it's very often.

What do you think? I bet that if you've been a fan of React, this is pretty inflammatory, isn't it? I admit, I probably don't know as much as you do on the subject.

On the other hand, you may be sick of seeing React everywhere like me. In that case, you're probably thinking of a few more points I could have brought up.

Whether you're seething with rage or want to pat me on the back, feel free to drop a comment or tweet me back. I'm looking forward to hearing from you.

(Tweet back on Twitter) (Discuss with Disqus!)

4 Reasons why you should write your own feature flag system

posted under category: General on January 3, 2023 by Nathan

A powerful feature flag system to charge your continuous deployment system is easily within your reach! It's literally the simplest system to build and add to your application.

I've been over why you would want your own feature flag system when I wrote about building my own. Make sure you know the benefits so you can keep the end goals in mind.

Since you're sold on the idea (as all devs really should be), I've compiled this list of reasons why you should build, not buy (or download), your feature flag system.

  1. It's so easy

A feature flag system is ridiculously simple to get started with. It starts with an "if" statement and moves up in complexity from there. Where does it stop? It depends completely on you, your dev team, and how many features you need to create.

  1. The devs are the experts

The developers who work on a system are the only ones that know how to modify the system correctly. A library doesn't know the best way. An external tool doesn't know how best to integrate. It's the developers that know, and the developers who will ultimately do the work.

  1. Bring your own opinions

When you build your own software, you have your own opinions about how things should work. This is ordinary software development. If your manager or product owner asks you to design a feature flag system for your application, you would have a very specific way of designing it, way of building it, way of integrating it, way of naming it, and way of controlling it.

To state the inverse, you are also rejecting unnecessary outside opinions that you don't need.

  1. Build what you want

Your own feature flag system can be as small as you want it, with as little overhead as you care to create. It can be directly inline with your code, or it can stand to the side. You make the universe the way you see fit. Creating your own software gives you the freedom to do it any way you want.

(Tweet back on Twitter) (Discuss with Disqus!)

I Wrote My Own Feature Flag System

posted under category: General on December 29, 2022 by Nathan
A blog series in which I confess to accidentally having written my own poor version of a solved problem

Feature flags really are a solved problem, right? I mean, there are big cloud services that will manage them for you. There are frameworks in every language, both as standalone tools, and full-fledged systems. We have feature flags in our build pipelines. Feature flags in our cloud services. I mean, this problem really seems like it's solved.

Then again, a lot of those systems, tools, libraries, and services seem really overkill. Some of them are massive. Even the smaller ones expect me to be A/B testing constantly. Maybe I'm not the FAANG company that this software is looking for. All of them seem to want to manage my users somehow - which I get, that's how you test with A/B groups.

What did I want though? I want the ability to deploy, even to production, without changing the user experience. I'm working with a lot of younger, and offshore developers, and I want to be able to turn off a feature if it doesn't pan out. My product manager wants to be able to specify a couple users for a specific beta test, then eventually roll the change out to everyone. These are not complicated use cases.

Unlike a lot of these stories where I confess to writing my own frameworks because I didn't know better, this one is really because I didn't like any of the frameworks out there. Plus how hard could it be? Turns out, not very!

The very first feature that we wanted to put a flag around was something that just wasn't code-complete yet. Using Vue.js as the template engine, my "feature flag" looked like this:

<new-feature-page v-if="false" />

That's terribly simple, right? When the feature was done, we just have to take off the v-if. Don't worry. We're Agile. This first version is the skateboard, or whatever analogy you like to use that explains how this is the simplest possible version that we can ship to our users. We can ship it, unit test it, but not show it to a single user.

In version two, we still didn't have any real data, since the database team was still working on the initial build scripts. The design of this FF system is to run it from the database and populate flags in our UI dynamically. Until that's a reality, I made a simple object with some of our known flag names, then a convenience function. That grew into a Vue plugin, something like this:

export const isFeatureEnabled = (featureName) => allFeatures.includes(featureName);

Vue.prototype.$feature = isFeatureEnabled;

So around the application, a .js file may import isFeatureEnabled or anywhere in a Vue component, my $feature plugin is ready:

<template>
  <!-- Used directly in the template -->
  <new-feature-page v-if="$feature('my-new-feature')" />
</template>
<script>
// or used in the script area
export default {
  mounted: {
    if (this.$feature("my-new-feature")) {
      // do stuff
    }
  }
};
</script>

That's about as convenient as it can be.

This second version used a static list list of feature flag names, added to a .js file in the UI application. It's nice because it's as fast as RAM, but it was not very dynamic yet.

Eventually the database was fleshed out and we created a FeatureFlag table. When a user logs in, they receive a packet of data - things like their name, their permissions, and some contextual information like what kind of airplanes they work on. I added the active feature flags to this login data packet through a very simple query like:

select FeatureName
from FeatureFlag
where Enabled = 1

So there it is, mission accomplished, right? That essentially handles it for the end-users. We have just a couple gaps left.

The next thing to add was tooling in our server-side application, like we did for our IU. Even through today, we haven't done much here still, but there's an injectable FeatureFlagService that can query the data, and maybe someday we will cache those results. We actually don't use this a lot, so the server-side evolution has slowed to a crawl.

Finally, for my SQL Server database, I added a simple SQL function that checks the status of a flag and returns 1 or 0. It's easy and is used heavily, mostly to switch entire procedures based on the currently active flag. This approach leads to versioned duplication of code, so we try to keep it manageable with a good naming scheme.

Feature flag taxonomy is a tough challenge. We want the name of the feature to represent where it is, and what it does, and it needs to fall in line with other flag names so that when you look at a sorted list of them, you know what they all do. We settled on a few naming rules. Our feature flags are kebab-case (that is, lowercase with hyphens instead of spaces) and hierarchically separated with slashes, named after parts of the application. For example, "login/include-xyz-data" or "admin/feature-flag-tool".

The last piece of the puzzle was a GUI to manage the flags. Another simple query to get the list, some easy APIs to switch the flags on and off. Easy as cake.

What went wrong?

As usual, building my own frameworks has it's complications and downsides. For instance, how do features migrate between environments? We have a system that involves bundling flags with SQL deployments, so anytime a database change goes, so do the new flags. But we don't have a central location to view and manage them across all the different testing and production environments.

One point of confusion we had, was that my international team didn't see our vision for targeting flags at particular users or groups, so we had the opportunity to build those parts twice. The end result, today, is called Feature Audience Groups where we add users to a group, then enable individual flags for that group. It's a simple additive-only methodology. I developed the concept of "feature flags move forward" - which means that flags don't usually roll back; a successful flag starts in the off position, then turns on for a group, then on for everyone, then we remove the flag. This forward motion simplifies the audience group flag management because flag groups cannot turn off a flag, they can only turn them on.

What did I learn?

A feature flag system really is just as simple as an if. I would encourage absolutely everyone to build one for themselves.

Today, we can safely deploy broken and half-finished features, and beta test them right in prod. We don't have to wait until everything is 100%. This freedom is worth the effort!

(Tweet back on Twitter) (Discuss with Disqus!)

I Wrote My Own Dapper, a .NET Micro-ORM

posted under category: General on October 30, 2021 by Nathan
A blog series in which I confess to accidentally having written my own poor version of a solved problem

It was my first .NET Core project ever. I knew a little ADO and ADO.NET from many years before, and I quickly learned enough about the built-in ORM, Entity Framework Core, to know there isn't a way to map SQL Server's stored procedures to EFCore entities. It's a shame.

This project had a team of data scientists writing a bunch of SQL that came out as record sets from stored procedures. Data scientists aren't necessarily great at SQL, but they managed to get it done. Questioning their methods wasn't something that was in the cards for me. Believe me, I tried. Nevertheless, they produced data, and I needed to consume it.

So the problem remained: there is no simple way in .NET Core to pull rows of data from a stored procedure into the application. So I started exploring. I have a pretty good memory, and I remembered the names of some classes in the System.Data namespace which, to my surprise, were still there. This is the fully rebuilt .NET Core and ADO.NET Core, but a bunch of the old things I knew from over a decade ago were still in there. Astonishing!

Thanks to google and stackoverflow, I managed to piece together something that queried the database. Moving forward, I could eventually read results! This was really working. I got a single stored procedure mapped to a simple class I built. Commit. Push. Deploy. Happy.

Mission accomplished, right? Hardly.

At this point, I was like 300 lines of code into something that I used to be able to do in 10. There were two problems:

  1. Building and sending the query takes multiple calls to awkward ADO APIs, and it's just too many lines of code. Sure maybe there's no better way to do it, and I appreciate all the control I get, but I'm just trying to make a little web app here. Why can't they just open and close the connections for me?

  2. Getting the data back is completely manual. I have to manually loop over the iterator that's streaming all the records from the server, set the columns by their ordinal position, and then cast types into my record object. This is a lot of lines of code.

In summary of my two problems, it's (1) the input, and (2) the output. Hah! Yeah literally the whole thing basically. sigh

So it was an obvious thing to quickly evolve it. I should be able to remove a lot of the boilerplate junk by adding some convenience features. All of a sudden, I could call the procedure in a single line of code! I added my connection to the dependency injection system so that any object in the data access layer can request it.

With a serotonin high off that success, I started to tackle the data retrieval problem. I poked around enough until I found how to get the return columns by their column name instead of their ordinal position in the recordset. But how do I know how the columns in the query compare to the properties in my data record class? The only way without a bunch of configuration is to use Reflection. I modified it to read the columns in the recordset and search through the properties in the target class to match it up. Works perfectly!

Now the API is something like this:

List<MyDataRow> data = await dataService.QueryAsync<MyDataRow>("exec usp_GetData");

Getting fancier, sometimes our front-end application needs different names for columns in the database. Also our data science team sometimes uses illegal names like columns with spaces and whatnot, so that's a mess. I looked around and found that ADO.NET Core has column alias hints you can give to properties for EFCore entities, why not use them here?. Adding those means my data-to-record mapper needs to build a dictionary between the incoming column names and the outgoing properties, with the possibility of multiple aliases or just with the property name. I suppose that's simple enough.

Then there's the problem of input parameters. Of course we need the ability to pass in parameters. ADO has this covered typically, with a SqlCommand class. Naturally, I wanted to have a way to simplify even that, but that one looks like it's nearly as simple as possible, so very little work to do here. It's actually inconvenient to create a SqlCommand, so I made a convenience method on my DataService from a fake SqlConnection and connect it to the actual one once the request was made.

Now queries looked like this:

var cmd = dataService.CreateCommand();
cmd.CommandText = "exec usp_GetData @myParam";
cmd.Parameters.Add("@myParam", value)
var data = await dataService.QueryAsync<MyDataRow>(command);

Is it the simplest I could make it, and it felt pretty good, so that's all I need to go to production! (I'm kidding! [kinda]). All the rest of the database connection opening and closing, data-model binding, and anything else is all handled by this DataService of mine. It could take any query data, populate any matching data record class, and spit out a List<T>. And it could do it really, really fast!

But I promised this was a duct-tape-and-shoestrings thing, didn't I?

Yes, in line with the rest of my accidental frameworks that have already been invented, I had two final problems - the first, as always, being portability. Taking this tool to a second app actually worked really well, which is surprising. Well, that is, until they needed me to connect to an Oracle server, and a Teradata server. I realized quickly that the SqlConnection is really just for SQL Server.

Taking it to a second app of course is where it goes from part of a product to a product of its own. Now instead of Sql*, it's Db* classes, like DbCommand and DbConnection, but configuring it to work with the differences in data types between servers ended in some unfortunate compromises. I'm sure that would have gotten ironed out eventually, but before long I was off to another project.

The second way that my framework fell short was in data mapping. There was always a single line of code that was prone to break, right where database types were mapped and cast into C# data types. The Flux Capacitor that did it was a single line of code that I commented very well. There are just some fields that don't map correctly, and every time I ran into a new one, or tried to cast it to the wrong type, I would get runtime errors. I think the answer to this would have been a utility called Automapper, but by now, why even?

What did I learn?

This was genuinely a fun project. In addition to the underlying ADO roots still inside the framework, I also got to really play with the implementation side of generics for the first time. Plus the chance to make my own ORM is just something that seems like fun to me. I'm still surprised that something like this isn't just included directly into the framework. Why is EFCore so limited?

I'd seen mention of the Dapper framework, and AutoMapper, a few times on stackoverflow answers, but didn't investigate them any further. I should really follow up on those kinds of leads more often. While it sounds like there is a problem with me -- and very likely there is in this case -- there is also the fact that my company doesn't like external software. If we didn't write it, how can we trust it? More than just a not-invented-here mentality, external software always has to go through a waiver process, and even new versions always have to be re-verified. It's often more trouble than just playing with some code and writing something custom.

Dapper

On the next project, I finally followed the stackoverflow advice and looked into Dapper, which was initially written for StackOverflow.com. Surprisingly, it wasn't much different than my little framework, with similarly named methods. Plus, as usual, switching to Dapper would mean that I don't have to write my own unit tests for it. Dapper was surprisingly easy to plug in, and thanks to its use of extension methods and anonymous types, it solves a lot of the usability problems I created for myself.

I do wish Dapper had better support for cancellation tokens, especially since I know it's built into the .NET Core framework's data access methods, and is relatively easy to pass an aborted HTTP call through in order to cancel a data call.

I also struggle a little with the fact that I can't write unit tests on code that uses Dapper to talk to my database because extension methods can't be overridden. Oh well, I guess. That's the price we pay for some things.

Overall, I'm much happier using Dapper for raw data access.

(Tweet back on Twitter) (Discuss with Disqus!)

I Wrote My Own Axios

posted under category: General on October 21, 2021 by Nathan
A blog series in which I confess to accidentally having written my own poor version of a solved problem

I was new to the “new” JavaScript. You know, the one we started doing when Node.js went mainstream and everybody started using NPM to launch their apps, and back when leftPad was cool. It’s fair for me to be this cranky about it; I wrote my first line of JavaScript in 1997, and I jumped in with both feet through the Prototype years, the jQuery years, and now, something new: NPM Packages and Webpack.

The JavaScript language was evolving, too. Meanwhile I was still trying to support my Internet Explorer users. That’s the corporate life. So the new ecosystem, plus the new language features, plus the new libraries, all had my head in a spin for literally years. Ours is a learning career. When you stop learning, you might as well stop your career. So, I guess the state of confusion is a good place to be.

My first Vue.js project started off on the far side of the progressive framework’s spectrum. That is, I added a tag to my layout and wrote a new Vue for each page. Vue.js is great at easing you into this world.

My next step was to normalize the way we bring data into the UI. We needed to use a token security system, and the other developers were already trying to get their own JWT and figure out how to copy & paste that code to all the features they were working on. I needed to act fast so that this didn’t get out of hand.

A cursory glance across the JavaScript universe brought up a few contenders - Axios, the download leader, whatwg-fetch and isomorphic-fetch that gave me trouble (probably beccause IE wasn’t compatible), and there were a few others that just didn’t pan out. Then I thought about the trouble of adding yet another .js file to my application, the additional download size, and what we really needed for this project. Then, you guessed it, I decided to just do it myself. How hard could it be?

It turns out, not very!

The first version of this first Vue project had jQuery built in, and we weren’t to the point of ditching jQuery yet, so since it was available, I could utilize it to hide my XMLHttpRequest business. I was confident that I could replace jQuery later in this instance.

In front of jQuery’s $.ajax method, my http “class” had get/put/post/delete functions as its API - finally a central place for all the API requests to come in. We added some UI logging on it to track API timing. We added JWT management so that it would all be handled inside the black box. It was also the smart place to add global error handling. This worked. I changed all the API code throughout the application to use my method, and we went forward successfully.

By the end of my time on that project, I had figured out how to get Webpack to precompile our Vue applications - individual applications per page on the site. I bought that knowledge forward to my next project. Again, everything seemed to be copy-and-pasted so I centralized the code and used the browser-native Fetch api with Babel targeting IE11 for compatibility and to automatically load any polyfills for me since IE doesn’t have Fetch at all.

This next iteration was even more successful. I could finally use ESM from the start, so I exported my 4 verbs - get/put/post/delete - which called into an internal function to contact the server and return the data. It didn’t take long until I found the cracks in that system.

Fetch is more than happy to return server-side errors to the UI. I was going to handle it. I wrote a bit of code before realizing that this is probably something that Axios already does. I double-checked the package size; for some reason I thought Axios was going to add like 40kb to my vendor bundle. It turns out it’s only 16kb. Not bad. Plus Axios is well tested, and I don’t want to write all the unit tests. It was time.

I switched to letting Axios handle the connections instead of Fetch. I still have my own adapter over it - not necessarily to simplify things, but more to control and standardize everything.

What did I learn?

Well, I’d like to say I learned to not sweat over a 16kb npm package, but the truth is, I still usually prefer to make my own everything until I run into trouble. I mean, isn’t that what this whole series is about? I clearly don’t learn!

Axios

What may not be evident, is how Axios and the browser-native Fetch differ. Of course Axios is essentially a library on top of XMLHttpRequest or the Fetch API. Axios simplifies the request chain a little bit, puts a slightly friendlier face on the request and response objects, and handles HTTP errors a lot cleaner than Fetch. Also, it has a bunch of great features like a cancellation token system, which is a little tough to use but better than my own absent one.

(Tweet back on Twitter) (Discuss with Disqus!)

I Wrote My Own Vue.js

posted under category: General on October 18, 2021 by Nathan
A blog series in which I confess to accidentally having written my own poor version of a solved problem

React was frustrating.

I had the pleasure of getting to rewrite our customer survey at work. It’s like “how do you like your airplane” kinds of questions. This was 2016 and I was looking forward to a 6-month task that required us to beef up the security and improve the looks for a helpful little program. Of course I chose to rewrite the whole thing, which had me shopping for front-end frameworks. Everyone was talking about React at the time, so I decided to give it a shot. What went wrong?

React basically has two modes: 1, you build the whole application in React, which requires live sacrifices made to the great and powerful NPM, forcing you to buy into the entire lifecycle of new JS development and everything that comes with it, or 2, you manually construct your html with the React.createElement() function, which is a fate worse than going back to the pre-CSS days of the internet. There’s actually a third way I found out. For the small price of a 22mb JavaScript bundle download, you could load the entire Babel transpiler into your browser! Uhhh, no thank you!

That was the state of things in 2016. I know it’s gotten a a little better since then. Don’t @ me.

So React left me out in the cold. I played with it for some time and just decided to give up, however I couldn’t give up the notion of component-based development and JavaScript-powered UI templating, plus immutable-state-driven UI. It was the right choice for this interactive project, I just didn’t like how the only framework I’d heard about solved this problem.

(I have a lot of other gripes with React, maybe someday I’ll finish this rant)

Apparently that’s as far as my research got me, so I whined and moaned about it for days like the grown man I am. “Why isn’t there a framework that does what I need?” Eventually I decided to move on and just make my own with a little bit of what I knew.

Really, I built some simple bridges between two basic technologies: jQuery and Mustache, then a few convenience functions to make it all come together.

jQuery is, of course, the simplest little library for finding and manipulating elements in the DOM. I knew it like the back of my hand so I knew I could fit it in, under budget.

Mustache.js is the less popular feature of this pair. It’s the smallest client-side templating engine I could find that could still get the job done. Mustache is the little cousin of the broader Handlebars library. It does some basic templating loops and variable outputs with curly brace {{ mustache }} syntax for the magic.

Mustache doesn’t have an easy way to attach itself to the DOM, or to produce highly interactive components, nor can it load components across external files. That’s where jQuery shines. jQuery can easily mount Mustache components and keep them interactive for subsequent user events. An HTTP call with jQuery would be all that’s needed to bring in and cache my component files.

I also thought about the concept of state-driven UI, and I was enamored with the idea of state changes that drive what’s shown. It’s a natural fit for getting the data right and being able to visible debug it. React uses setState() to change things - something like that would be easy enough to implement. Luckily I didn’t feel the need to write any major reactive data systems. I emulated my understanding of React’s state management through a finite state machine that controlled state changes. These state events are like nextQuestion and completeSurvey.

Did I succeed in creating a great JavaScript framework? That’s laughable. You know the answer. I did not.

But did I at least come up with something that worked better than React for my situation? You better believe it.

What did I learn?

Remember kids, you can build world-class enterprise apps with the tools you already have on hand. It helps to read a few books beforehand; I think I had just finished a couple of my favorite short reads - Javascript: The Good Parts and The Facts and Fallacies of Software Engineering which put me in the mood to build something great.

Of course looking back now, I realize Vue.js was already 2 years old. I suppose I should have done a little more research!

Vue.js

Fast forward 2 years. I’m on another project dealing with production factory analytics. By now there was a lot of internet dev chatter about the big-3 frameworks - React, Angular, and Vue. I did my research and picked Vue at 3pm on a Thursday. My buddy Joseph and I, pair programming, included Vue.js onto the page, mounted it to a DOM element, and instantly I was able to loop and output properties. It was way easier than React, and much more powerful than Mustache. I was instantly hooked! I rolled out the feature change before I went home. The very next morning we got comments on how quickly that page seemed to be running.

That was the day I began to realize that Vue was the framework I had wanted all along, and attempted to build. Sure, I built a cheap, duct-tape-and-shoestring version, but Vue was what I was dreaming about.

As I studied the Vue.js framework a little more over the next few months, I quickly began to realize that Vue was so, so much more. Vue’s reactive data system is so far beyond the cheap state management solution I had, that I can only look back and laugh now. That simple include-the-script idea was there by design to lure folks like me into the NPM world. Tricky.

(Tweet back on Twitter) (Discuss with Disqus!)

I wrote my own ORM

posted under category: General on October 16, 2021 by Nathan
A blog series in which I confess to accidentally having written my own poor version of a solved problem

I joined a new project at work. OK, joined is a polite word. A product was thrust into my lap. It has great documentation and lots of clean code written --maybe generated? Nevertheless the generator was missing and so were all the previous developers. One thing it had in spades was a strong MVC N-Tier Architecture. This made it really easy to find things, change things, and understand how the system worked.

By the way - if you do this for your application, you’re doing this for the next dev that maintains your application - and we thank you!

As I maintained this application for a while, I began to notice similarities in parts of the application that really were redundant. Specifically the data access layer. It was split between data access objects (DAOs) and data gateways (DGs). While the DGs had a lot of odds and ends that would return various recordsets, the DAOs had the same system over and over. CRUD. Load a single record and populate a single object. Read a single record and perform an insert or update. Delete a single record from the database.

The only things different were the names of tables and the names of the columns. There were a couple one-off tables without a single PKID column, but those weren’t the meat of the system.

I began to literally sketch out some potential solutions. The end result looked a little bit like this:

partial orm diagram

I began playing with constructing the SQL statements for each table based on component metadata. Properties in my components would probably need some custom metadata, but that both helps get this job done, and self-document the system a little better. Did I mention I was using ColdFusion for this? It makes things so simple. Watch.

The user class starts off looking like this

component {
  property name="id";
  property name="name";
  property name="role";
}

Thanks to ColdFusion’s custom metadata system, I can throw anything I want on there, then pull it out when I’m building my DAO queries.

component table="user" {
  property name="id" pk="true" required="true" sequence="seq_user_id;
  property name="name" type="string" required="true";
  property name="role" type="string";
  property name="someDynamicProperty" persist="false";
}

So on one end, I used this to build my CRUD queries, then on the other side, I used the metadata to map the recordsets back into the models. It was actually pretty simple, once it all worked.

I tried it out for a few new tables as part of a new feature. That’s how you add your innovations and entertainment, by the way – you make the fun stuff a “critical” part of the less-fun stuff. Once that worked, I spread it across the rest of the system. In one day I reduced the codebase by 3,000 lines!

I took it a little further by auto-generating some basic list functions, like the neat little listByCriteria where you send in an object from the table with the properties you want to find.

var criteria = new User();
criteria.setRole("Admin");
var admins = dgo.listByCriteria(criteria);
What did I learn?

It’s a lot of work up front to generate your own queries, but a lot less work in the long run when you know you’re getting the most optimized experience you can. Sure the ORM here was simplistic, but so were the needs of the application.

When you make something that’s like a framework, but it stays as part of a single system, it tends to integrate tighter than you expect. This ORM became an integral part of the application it grew from. The downsides with that are that it would have been very difficult to replace it with a publicly available ORM, and it became harder and harder to reuse it in another system. In this ORM’s case, it never grew out of this application.

Of course, now that other ORMs exist, I don’t think that I would do this again. However… I have another one coming up that would prove me wrong. Stay tuned.

(Tweet back on Twitter) (Discuss with Disqus!)

I Wrote my own Hybrid SPA+SSR Framework

posted under category: General on October 14, 2021 by Nathan
A blog series in which I confess to accidentally having written my own poor version of a solved problem or popular framework

It was 2009, and I thought to myself “jQuery is just so verbose.” I mean look at this code I have to write in order to download an HTML fragment from the server and inject it into an area on my HTML page.

$("#target-area").load("/api/users/list");

OK, Ok, ok. It’s not that bad. But imagine you did this with Prototype.js, the dominant framework before jQuery existed.

new Ajax.Request("/api/users/list", {
  onSuccess: function(response) {
    $("target-area").update(response.responseXML);
  },
});

Or imagine you started the project without a JavaScript framework

function reqListener () {
  var el = document.getElementById("taget-area");
  el.innerHTML = this.responseText;
}

var oReq = new XMLHttpRequest();
oReq.addEventListener("load", reqListener);
oReq.open("GET", "/api/users/list");
oReq.send();

I was on a project for a short time that had hundreds of screens with code like this – all customized for each and every page, all repeated, with so much boilerplate bloat that I questioned the reason for software altogether. If we add input fields into that code along with form submissions, validation, error messages, and so on, you can imagine how quickly we had JavaScript files that were tens of thousands of lines long. Then came the memory leaks, name conflicts, and maintenance.

Yes we could have done better, but I was just a loan-in, and I wanted to see what kinds of things we were building elsewhere in the company. The point is, this application made me afraid of what we could create if we didn’t start thinking about systems to handle bloat before we had problems with it.

I had an idea. What if we could implicitly load content based on some basic HTML, and use jQuery to sniff out what needs to be loaded. Just follow me down this trail for a minute.

What’s an ideal amount of JavaScript to write? None! Stupid question, I know! I figured that this is the perfect job for a data attribute. I only need to tell the content where to go, like so:

<a href="/api/users/list" data-target="#main">Users</a>

The first version of this HTML-powered, server-side rendered app looked something like this:

$(function(){
  $(document).on("a[data-target]").click(function(e){
    e.preventDefault();
    $($(this).data("target")).load($(this).prop("href"));
  });
});

It ballooned up from there, into a few hundred lines of code that handled global and inline loading spinners, delete confirmations, forms, caching, and errors.

Ahh - but you must be thinking: if the server is generating those HTML fragments, what happens when I open the link in a new tab? Well, jQuery’s AJAX api sends a HTTP header to let us know if we are in an AJAX request. With that header in place, the server sends an HTML fragment. When that header isn’t there, the back-end framework will wrap the fragment into the layout and send a full page.

It’s only a matter of the fragment being rendered with the full layout, or without.

Does that really work? Yes! It turns out it works really well. This web app was 100% functional without JavaScript. Why? Convenience! Also, users found they could open links in new tabs without a problem.

In today’s terminology, I think we would call this a hybrid SPA/SSR. Yes the discount, dollar-store version, but still, it fits the bill. Really, it was a pretty successful project.

What did I learn?

When I attempted to adapt it to another application, I learned that I either needed to cut this ‘framework’ up into smaller, individual parts that could be used independently, or bundle it all together as some kind of super-framework. Just taking parts of it was not a portable solution.

That doesn’t mean it was a waste. Not at all. This framework as its own glue for what it is, is a really cool solution that makes one application pretty easy to read and work on.

(Tweet back on Twitter) (Discuss with Disqus!)

I wrote my own Fusebox

posted under category: General on October 13, 2021 by Nathan
A blog series in which I confess to accidentally having written my own poor version of a solved problem or popular framework

It was 1999. I worked at a small agency in Alaska, and I just learned to program in ColdFusion. I drank Mountain Dew and exclusively ate from Taco Bell. A guy at work, probably 15 years my senior and trying to escape code, told me about how to arrange an application, recommending that I make a “fusebox” - a big switch statement that would control what gets called and shown. I started piecing it together.

The project was an online storefront for a local music producer. This was my first real programming project at work, if you don’t count small JavaScript image replacement and form validation scripts, way before CSS and HTML would do these things for you! I frequently forget that I’m old until I say things like this.

So I set up a switch statement with the expression being url.action (the action property in the query string). The switch cases are includes to individual view files, or database calls with a redirect back to another action.

Really this isn’t too different from modern-day frameworks - a router, views, and room for back-end activities.

What did I learn?

It was nice to have a central place to apply security and global request filters. With all the requests coming in through this one file, it was the central hub of the application. That also opened it up to trouble. One coding mistake on the switch meant that the whole application was broken. I made a lot of coding mistakes back then, so things broke frequently.

I used an include for the HTML header and footer, so those just got included right on the switch page. Easy way to make a layout, even if it’s rather lame by today’s standards.

I initially had all the database communication right there in the switch. That really doesn’t scale since that flux capacitor there is now doing literally everything for the whole application. Pretty yucky but I didn’t know better.

Also, this being one of my first professional projects ever, I quickly realized the need for better organization by filename taxonomy.

Fusebox

The first version of Fusebox was merely a word, a convention of organization, which was really not much different than what I had built as a teenager. I’m sure it was at least a little more formal than that, but the internet was young and we didn’t exactly google for information – you had to know someone.

The second version of Fusebox had some official files - some amount of hard matter for the framework. Fusebox 3 actually set you up with structure and files and sub-folders of switches - a real framework finally.

Fuesbox eventually became the gold standard for frameworks in the world of ColdFusion. It was a short-lived title, in those years when XML was cool, before object-oriented features were added.

Have you built your own framework like me?

(Discuss with Disqus!)

Scavenger Stroll - My Kids' FLL project to encourage exercise & activity

posted under category: General on November 24, 2020 by Nathan

Every year, thousands of FIRST Lego League (FLL) teams work on an innovation project of some type. This is in addition to the actual Lego-based robotics competition where they solve a number of robotics-based challenges. The competitions can be a lot of fun, definitely full of energy! The annual challenge (not the robot part) is always something new. This year it was creating a solution to make people more active.

This year, my two younger kids’ FIRST Lego League team had an idea about building a scavenger hunt in a nearby park. They came to me with the idea to build a mobile app, and talked about all these bells and whistles. Like any good engineer, I talked them down to something more realistic and achievable. Plus something that’s in my wheelhouse.

Our joint solution was to build a mobile-friendly web site. This gets away from publishing to multiple app stores, paying a developer fee on one of them in particular, and working around bugs from multiple codebases across the different platforms. Of course now that the web app is built, it would be possible to port it through something like Phonegap or NativeScript, but I think the web app will be just fine.

So let’s talk about the scavenger hunt! This team created a list of things to find along the walking paths, took photos of them, and came up with the application’s rules:

  • There are 2 different scavenger hunts
  • Show as many as 10 items at a time
  • Each item has a photo that can zoom in
  • Each item has a checkbox
  • Once they’re all checked, you win - celebrate with fireworks

Items to find are things like certain kinds of trees, categories of animals (reptile, bird), or park locations like the gazebo or the lake. The team also wanted to make sure we had links to find more wildlife info.

After the app is published somewhere, we will put a sign up with a QR code that will link directly to the web app.

Work begins

On our first work night, we set up VSCode LiveShare so that we could all work on the code together at the same time. This was a huge pain to set up, but was an incredible collaborative tool once it was all working.

I showed the kids HTML, CSS, and JavaScript and we built the structure and outline of the web site. It’s just three pages, one JavaScript app that we powered with Vue.js, and light CSS styling on top of Bootstrap. Once it was all done, we practiced pulling and pushing the code into GitHub. Mind you these kids are 10-14 years old. It was really awesome to see them understand it conceptually and then take it home and still push a few more changes!

On the last team night before the QR code sign was printed up, I integrated our Git repo with Netlify - we were up and running in our forever-home within two minutes!

Some of this technology really is just getting so much better. From the libraries I easily integrated, to the free hosting, it was a lot of fun to set up. Maybe the best part though was doing a project like this with my own kids. I loved it, and I hope we can do more things like this in the future.

So without further ado, Scavenger Stroll for Wannamaker Park in North Charleston, SC:

https://wannamaker-scavenger-stroll-2020.netlify.app/

I hope you enjoy it, and I hope it inspires you to do something great.

(Discuss with Disqus!)

I teach coding to high school students

posted under category: General on November 23, 2020 by Nathan

Let me start by saying that we home school. And not just this year.

Initially it was out of a desire to keep our first kid ahead of the learning curve. This smart one was reading before kindergarten. Hey it worked - she graduated a year early and is making her way through college.

Something unexpected that came from this screwball 2020 year was the opportunity to teach a class at a home school co-op. This is essentially a one-day-a-week school experience that teaches those subjects that parents don’t want to do at home. We unashamedly use this for English classes, among a few other things. Families can pick up a class here or there, or build their entire curriculum out of it. There’s nothing home schoolers cherish more than the freedom to make educational choices for themselves, so this works for a lot of people.

We noticed that most of the teachers here fall into a couple small categories: parents of the students, and retired teachers. My wife has a particular interest in personal finance, with the real goal of making a generation of young people who understand things like credit scores and compound interest. So with all the qualifications being met, she’s been teaching her favorite things to high school students.

This year I found some spare time somehow (anyone else with me on that?). My wife put the bug in my ear about teaching a coding class. I really wrestled with what that even meant, and what students could benefit from it. When I heard our last CS teacher moved away over the summer, I knew we had a gap - somebody had to teach a computing credit. So with all the qualifications being met… why not me?

Also, more importantly, how?

I want to teach real languages and programming skills. I want to teach students to actually code, to understand what the computer is doing, and to see things from the inside. All of the curriculum I could find for high school seemed to be based on Scratch or Legos. It’s not that there’s anything wrong with that, just that there aren’t a lot of professional jobs for dragging-and-dropping Scratch blocks.

Maybe I’m a rare gem or something, but I started coding web sites in high school, then graduated and started getting paid to do it that same week. We all know the bar is a lot higher now with front end development being nearly impossible to break into without a good mentor and who-knows-how-many years of practice, but I like to think it’s still possible to start a career coding web sites.

What languages does that leave me with? A lot of options, so let’s rule out anything grossly unpopular, anything with static types because type systems are a little tough for noobs (more on that later), and anything I don’t know (and that’s a lot). Then make a strong preference for those languages that work directly with HTML (haha yeah, ok, that’s a list of 1 now). I thought about Python, and maybe I should have thought harder, but I chose JavaScript.

To be fair, I see some of the folly in my ways. There is a challenge with some kids when programming moves from conceptually understanding what to do, to typing the code out on a keyboard. Furthermore, curly braces and parentheses can get messed up in ways you don’t want to see. Maybe Scratch would have been smart. Maybe Python would have been wiser.

Still, I stand by my decision to use a wider-purpose language than Scratch. JavaScript is debatable for a first language, but I have plans to tie it in with the next semester when we code up HTML and CSS. In fact, I’m planning to use the project that these kids finished the 2020 school year with in their 2021 web site that we are building next semester. This is why Python wouldn’t be my primary choice for a student’s programming language – it lacks that one critical integration: the web browser.

Why HTML and CSS? “Aha those aren’t programming languages!” you may say. And you would be right, but this isn’t a programming class, it’s a coding class. You don’t program HTML, but you do code it! I want these students to be well-rounded in what is debatably the most important software skillset in the history of the world - HTML, CSS, and JavaScript, the fundamental building blocks of the web.

Class started in the fall. 17 students showed up! This is my first class ever, I’m pretty excited! Also nervous. Stomach ache nervous. Stomach aches aren’t a sign of COVID however so forget that! This is just like a conference talk or anything I’ve done before, I’m going to knock it out of the park just based on my vague charm and the meme humor in my slideshow.

Yes, there’s a slideshow! It’s a Google Sheets slide deck. I picked one bold presentation theme for the year and have stuck to it. We’re actually fully on the Google stack of education. I have a Gmail account through the school, a shared Drive, and we are suffering through the underdeveloped early years of Google Classroom, which is still better than most of the alternatives.

One of my students was staying home, hoping to skip past a possible first-wave of COVID-19 as soon as school started, so unless I want to video record the whole thing and post it for the class (hint: I don’t), I’ll need to have some way to transfer the knowledge across the internet so when he finally attends physically, he won’t need to catch up. Every week I post my presentation in Classroom. At first just for him, but then I realized that it’s a great tool for the students to review our lesson, check on what the homework was, and read my possibly embarrassing speaker notes. I love transparency when it comes to learning.

I told the kids that everything that happens inside a computer is knowable - something you can learn. It seems like it’s a sealed black box, but that’s only because you don’t know how to open it yet.

The lessons this semester have been loosely adapted from Eloquent JavaScript. I went through a lot of JavaScript books and curriculum and I decided on this one for a number of reasons. One of which is because the book is completely free, even though I bought a paperback copy to study. The other reason is because I liked the order of the approach - variables, data types, operators, flow control, functions, then objects and arrays. Furthermore, Eloquent JavaScript is modern enough to not recommend you do it all in a browser by including a script tag, which is something common I see as a side effect when teaching a 25 year old language.

So we kicked it off. Leson 1, install VSCode and Node so you can run .js files. Lesson 2, hello world! Then onward and upward from there. We’re only 13 weeks in and that’s the end of the first semester. That’s right, I’m writing this in retrospect of my first half-year! How did it go?

Lessons learned

There can be a mental hang-up when first trying to put code into text, as I said earlier. For some of the students, this was, and still is, a big mental block.

The different braces and brackets are confusing. Why do we use curly braces on if statements and on loops and on functions and on objects too? This is where I began doubting JS and reconsidering Python for next year. At least square brackets usually means we are talking about arrays, and parentheses usually means it has to do with functions.

A student dropped out! He was probably the youngest one in the class, 14. I don’t know if it’s a brain maturity thing that grants the ability to write software, but I think that could contribute to it. Honestly, with my ~3 week introduction, he could probably pick it up and ace it in 2 years. After that, I started pre-presenting the presentations to Elly, my 11 year old. She seemed to get it and helped me smooth over the rougher stuff for the next few weeks. She also wasn’t great at the technical parts of coding, but she understood the concepts. Elly is smart!

Typing speed Something that popped up right away was the fact that most of the class typed under 30 WPM, and we had a few hunt-n-peck typists. I started assigning an amount of typing every week, with the goal of getting at least 60 WPM with proper touch-typing form.

Editing text is a skill that nobody knows without being told. This is one that I remember learning initially, and I still learn new tricks pretty frequently. We had to talk about text navigation, shortcut keys, saving often, and I even had everyone install Prettier to clean up what they’ve written.

Creating files was an actual challenge. There are precisely 44 ways to do it with VSCode (I didn’t count, I’m sure it’s over 6), and I don’t like to force people to do it “my way.” Honestly i don’t even prefer a specific way myself.

The JS Debugger isn’t good enough. There are errors that don’t get shown correctly, and some random outputs that are unexpected, like “Undefined” output randomly and rendering of empty blobs when using console.table. Students are easily confused about that. Then they as me, and I’m easily confused about it.

I assigned FizzBuzz, which is maybe a little sadistic after just a few weeks of classes.

One student nearly finished FizzBuzz before class ended. Everybody else took all week. A couple of them never even turned it in.

We made rock, paper, scissors to practice our skills. That was pretty fun.

Our big project was a card game. Make a card, make a deck, deal a hand to at least 2 players, then declare a winner using whatever rules you want. I recommended high-card, then add poker rules for bonus points. My star student did the easy stuff, then built a blackjack game. Everybody got a passing grade, at least.

I explained functions twice. Maybe three times by the end. It’s a complex solution to a complex problem.

My son wants static typing! He asked me about dealing a hand of cards, and how function parameters work. He noticed it was difficult to tell what the argument in the function was supposed to be. I’m pretty proud of him. Without knowing it, he was asking for a stronger type system.

Throwing errors. The class thought the verbiage was funny. Throwing and catching. We didn’t go over it except in passing, but the terminology is somewhat memorable.

That’s it for now. I have a lot more but can’t think of anything right now. Feel free to ask questions!

(Discuss with Disqus!)

Dopefly update

posted under category: General on February 12, 2019 by Nathan

Popcorn post incoming. I'm kind of tired of seeing how non-mobile-friendly my web site is when I see it in google's search results. Also, I feel a little bit of blogging coming on. That, plus work having calmed down over the last few months, and I upgraded my PC at home, it just feels like the time to clean up a little bit and start typing more.

Did I mention that I'm on Hostek now? It's fantastic and very affordable! Such a great service, I highly recommend it! Better tools honestly encourage me to do more.

Speaking of... maybe I should upgrade my own little blogging software. This is an extension of the 2nd one I wrote, with a couple data migrations, some hacks and bug fixes, and hardcore caching thanks to a previous host I had with an unreliable database. Unfortunately the posting software is just the worst. Clearly I have the skills to do something great here. Some day I'll get to it.

Also, I'm about to remove my own commenting scheme (thanks, spammers) for a regular old Disqus comment system. That's happening in 3... 2... (probably by the time you read this).

So yes, I'm mobile friendly, finally, about 5 years later than I should have been. Flexbox layouts are so stinking simple! I noticed my last post said I was hacking on UWP apps. Thankfully that chapter closed! I'm back on the web, grateful to be doing the kinds of things I want to do.


(Discuss with Disqus!)

From Miami to Nassau

posted under category: General on February 14, 2017 by Nathan

You want to travel to the Bahamas and you have to pick a web programming platform to take you there.

ColdFusion is a cruise ship with almost no other passengers. It's all inclusive. It's a smooth ride, but sometimes it docs 50 feet from the port and you have to swim the rest or book the last bit with Java.

Java is a full cargo ship. It's slow to get moving. You have a very safe room in the center of the boat but you have to catch any cargo containers if they fall on you. You'll get to Nassau, eventually, and it's safe because there are a lot of boats here in these shipping lanes.

ASP.NET WebForms is a yacht that drives backwards and only responds to events like when you run into a dolphin.

ASP.NET Web Pages is a very small yacht that tows the ASP.NET MVC yacht where all the parties are thrown.

ASP.NET MVC is a yacht with an iron hull. It sits heavy in the water, but it can clip along at a good pace and there are nice rooms. Many parts are actually designed well, and it should because it cost you a pretty penny.

Go is a navy destroyer. It's much faster than the published speed, but not very comfortable. Unfortunately, you only wanted to go on vacation. As you get on board, you unintentionally sign with the navy. You can't stop talking about how much you love it all.

PHP is a tug boat with tires tied to the outside. Why would you go to the Bahamas in a tug boat? It can get you there, but where is the bathroom? Everyone except Ruby is passing you and it seems like they're all having a better time.

Ruby is a beautiful steam-powered riverboat with a huge rotating paddle in back. Nothing matches its charm and luxury, but it's going to take you forever to cross the ocean in this, and it might just break on the waves. You hope for good weather and set out before finishing any seaworthyness work because it's already floating.

Python with Django is a sailboat with big white sails. If you know what you're doing, and you trim your whitespace sail in the correct position, you can get moving very quickly.

Python with Flask is a windsurfing board. It's basically a sailboat, but it's very basic. Extend it with a surfing kite to head out across the ocean.

Node.js is 370,799 tiny interconnected boats that let you walk to the bahamas. Only one person can move at a time. (Note, the NPM repository at this time has exactly 370,799 packages in it.)

CGI with C++ is an ocean row boat. It's a lot of effort but you're definitely going to get there, so long as you don't give up.

C is a life raft, deployed a few miles off of Miami. Good luck.

Assembly is a stick. You hold it over the water, hopefully the ocean will part. It's an older way of sea travel, granted, but if you know what you're doing, and you pointed it the right way, you can drive a ferrari to Nassau. Also, you question if anyone's really done this.


(Discuss with Disqus!)

Craigslist as free cloud storage for your physical stuff

posted under category: General on February 16, 2014 by Nathan

I'm moving. This year, The Boeing Company is relocating my family to Charleston, SC, along with an untold number of my IT compatriots in an effort to put like minded people in the same "centers of excellence."

Moving across the country has its challenges, even if all your expenses are paid. There are things I don't want to move, but I don't want to lose forever. These are things like couches, tables, yard tools, patio furniture and other non-unique things. It's stuff that's replaceable but I would hate to buy again.

I had this idea about how Craigslist can be like a storage shed that travels with me wherever I go. I can sell a couch in Phoenix, move to Charleston and buy a replacement couch for the same price. It may not look exactly the same, but the couch's value is identical and it probably matches the Charleston area more than its Phoenix counterpart. If I want to get a better couch, I just have to pay the difference - an upgrade fee.

Brilliant!

Then, I began to realize this works even without moving across the country, and can also combat my hoarding tendencies.

Let's say you own a crib. It's nice and you don't want to lose it in case you have more children, but it's large and you don't really want to store an item as useless as baby bed when you don't have any babies. Put it in cloud storage; put it on craigslist. If you never need it again, you keep the money. If not, you spend the same money 3 years later to buy another crib that is just as nice.

This works especially well with electronics. Say you have a 1 year old notebook computer, but you won't need it for the next year, so put it in your cloud storage locker (yes, craigslist). Next year when you need it again, pay the exact same amount of money for a 1 year old laptop. Your first one is now 2 years old, but your cloud storage locker includes free upgrades while your items are in storage, so this one is a year newer.

Sweet, thanks cloud storage!

Stop holding on to your possessions. Sell them into the cloud and buy them back when you want them!

(Discuss with Disqus!)

Monty Python Uses Correct 3-Factor Authentication

posted under category: General on January 10, 2013 by Nathan

Let's talk movies and security for a minute. Obviously Hollywood has proven they don't know computers, don't know hackers and don't know security - they know fun stories and special effects, but there have been more awful portrayals of computing than good ones.

Single-factor authentication has been deemed bad form on the internet, and easily bypassed in movies. We have all seen where someone knows the password or cuts off a thumb for the fingerprint scanner. That's simply not enough security. In real life, most passwords in use are plucked out of the most used passwords lists. One single password is easy to guess, and it's obvious because people get their accounts 'hacked' all the time. Single-factor authentication is simply not good enough.

Two-factor authentication is better, but not perfect. Again, there are movies where voice and eye prints are stolen, or a password is guessed and a fake thumbprint is used. In reality, two-factor authentication comes around in the form of web sites that send you a text message or email when you first log in from a new device and you have to enter the code from that separate message. It is a huge step forward because now it's something you know (password) and something you have (access to the email or phone). However, if one account has been taken, how can you ensure a hacker has not also obtained access to your email? It's not foolproof, but it's much closer.

Three factor authentication means "something you know" (password), "something you have" (email/phone/badge/fob), and "something you are" (finger/eye/hand print, face scan, etc). If anyone in any movie actually used this, the bad guys would win a whole lot less. Think about it. You can't just take a finger with you because you need their password. Guessing the password and hacking their email account still means you are missing the physical person. Stealing a badge leaves you lacking as well.

In Monty Python and the Holy Grail, at the Bridge of Death over the Gorge of Eternal Peril, the bridgekeeper asks three very important questions. Let's look at them:

1. What is your name? In authentication terms, he wants "something you are."

2. What is your quest? Could be interpreted as "something you have" though, to be specific, this is something you do not have.

3. What is your favorite color? What is the capital of Assyria? Without a doubt, "something you know."

When you think of computing and movies, Monty Python has all of Hollywood beat. You heard it here first, folks.

(Discuss with Disqus!)

Good news, Dopefly is back up (mostly)

posted under category: General on April 8, 2012 by Nathan

Here's a note to say that Dopefly is back up. It's been about 3 weeks. Yeesh, awful, I know. Now I'm back up on MySQL, so please drop me a note if you see anything broken around here. A rewrite and redesign is in the works, and may be out sooner than you expect.

Sorry to everyone who missed the content, and especially to Mike Henke who linked my post about actually understanding closures in ColdFusion 10 from The ColdFusion Show.

Update: Looks like auto-incrementing PK columns didn't make the migration to MySQL from SQL Server, so I'm going to guess that comments won't work. This post took a lot more work to get published than it should have.

(Discuss with Disqus!)

Negligence Season 2011/2012

posted under category: General on February 10, 2012 by Nathan

So I was doing really great late last year preparing my LESS CSS talk for Adobe MAX, then MAX hit, I finished my presentation on LESS, and I just collapsed. It felt pretty nice, I won't lie. Soon thereafter the holidays started, family activities picked up (did I mention I have 4 kids?). Worse and/or better yet, my fantastic company takes the Christmas through New Year week off and right at the end of that, I got sick with "the Skyrim". It was bad. I still have it, a cough here and there, a sleepless night when I forget my reality pills. I feel bad for all of you who have caught it along with me. It hurts sometimes, but it feels so good when I give in...

Let me recap a few things I should have already by now.

Adobe MAX 2011. This was a great conference. Adobe pulls in amazing speakers, authors and technologists. Ray and the unconference crew also had a fantastic lineup, and it was really, really great. The MAX bash this year was over the top and by far the best party I had been to in my entire life.

Then my boy, Jude, turned seven and we had a Mario party (pun intended), so then I had a new best party ever. Sorry Weezer. Sorry fancy candy pavillion.

Alanda, my wife, scored a Kindle Fire for Christmas. She loves it. While I know it's Android under the covers, she never would based on any evidence. It's Kindle through-and-through, and a great all-around device IMO.

I visited the new Boeing South Carolina 787 factory in late January. It's a beautiful place, and I would move my whole family into that building if I could. About the jet - I am sold on it for sure, and I will buy the first available one as soon as I find the $170m or so that it takes. I am still asking around about the employee discount.

Finally we come to today. I'm reading The Facts and Fallacies of Software Engineering. I count this as studying for one of my CF.Objective(). talks. Speaking of...

This May Is CF.Objective()! I have two sessions to call my own - "Making Software Better" and "LESS CSS, Meet ColdFusion." I'll talk more about these later, but for now this has gone on long enough. Here's to a successful blogging career in 2012!

(Discuss with Disqus!)

Adobe and Homeschool (free and discounted software)

posted under category: General on October 17, 2011 by Nathan

I'm not related to Adobe, but I do co-manage an Adobe software users group for ColdFusion. Adobe has been really good to the group, giving us shirts and pens (swag items), plus two huge software giveaways every year, and lots of other benefits for my co-manager and I. That's my disclaimer. I like Adobe because they like me, and because their software is great.

Another thing I do is school my children at home. Well, who am I kidding, my amazing wife really does all of the hard work! There are a lot of up-sides and down-sides to homeschooling, same as any schooling option, but it's just a choice we made and are taking it year-by-year with each of our kids.

With all that said, I want to highlight a couple things that I found on Adobe.com for home schooling families.

According to Adobe's educational purchasing eligibility page, Adobe's education discounts apply to homeschooled students and their teachers. To prove that you are a valid home school family, about 2/3 down that same page lists the articles you can send Adobe as proof. We are a member of a couple homeschool associations, so I scanned my AFHE ID card.

Now what can you get with it?

Adobe.com has a great site for introducing their software in education, Adobe Education. Check it out. From there, I discovered the educational price list. You can see it for yourself that the price differences vary. I would say that most of the software is around 60% off, but some is 75% and some only 25%. A few of them are even free!

Those free packages point to the Free RIA Tools site. You can get ColdFusion 9, ColdFusion Builder 2 and Flash Builder 4.5 for free, just because you homeschool your kids! I made my request last Saturday and was given a serial number today (2 days later).

That's a win, fellow home-schooling families. Very expensive software, yours free.

(Discuss with Disqus!)

A week with the BlackBerry PlayBook

posted under category: General on May 19, 2011 by Nathan

If you've followed me on twitter even a little bit over the past week, you probably learned that I was at CF.Objective(), and that I have a new BlackBerry PlayBook. I've been tweeting about it like crazy, I just can't stop. I don't remember being that excited about the iPhone, probably because everyone already had theirs. It's nice to be on the cutting edge once in a while.

So it's been a little over a week since I got my PlayBook. I'm not a BlackBerry fanboy, like I said, I've got an iPhone, BBs never appealed to me. Also, I didn't buy it, I haven't wrapped any money in it, it was a gift, and if they did it just to make people talk about it, they win; I have been talking.

In a couple minutes, after making my way past the gorgeous packaging, I was setting up my PlayBook. It guides you through a few easy, non-invasive steps, no credit cards involved, install a 300mb update over wi-fi, restart and it's all good. They left me with some helpful videos on how to use the device, I found them interesting and I wanted to know what I was doing, so I watched them.

The multitasking interface has taken a bit of criticism from my friends. They don't want to learn a new interface or they aren't so sure about this swiping from outside the screen. Yes, the frame is touch-sensitive. Somehow, I found it perfectly natural. Switching between apps is a swipe from side-to-side, going back out to the menu is a swipe from the bottom. The application context menu is a swipe from the top. The menu bar (battery / wifi / clock etc.) is a swipe from one of the top corners, and the keyboard from the bottom left corner. Multitasking is a rich experience and more akin to a desktop computer, like hitting [win]+[tab] on Win7 to switch tasks. I find it so natural that I keep trying to swipe-up on my iPhone.

The PlayBook multitasking interface

So after playing with the interface, I loaded up the App Store Market World. I will skip being tactful. The apps suck. They are so bad that I am seriously thinking of building a few things for myself that I need and use daily, like an Evernote client (where I am writing this), a Read It Later client, a Netflix streaming client (if only), file browser, a twitter client, and some decent games. The list goes on and on. The apps are either not there, or are so bad that it doesn't matter. The good news for developers out there is that it means the field is ripe for the picking. Really, any app that's not built-in is a good idea to create.

The browser however is amazing, simply for the fact that flash works, and it works well. Browsing the web was responsive. Zooming in to content is a bit slow, but it works fine. Navigating is a lot like the browser on my iPhone.

Videos on the 1024x600 screen are beautiful. High-definition mobile video is the new hotness for me. I love it. I loaded a few movies up for the plane trip to & from CF.Objective(). It takes everything I throw at it - MP4s, WMVs and Divx avi videos mostly.

At first I had no idea how I was going to get files on & off. I plugged it into my PCs USB port, installed the drivers and started copying files, then I found my favorite setting. With 1 setting I can turn on file sharing, and with another, I can turn on file sharing over wi-fi. As soon as that goes on, a new share appears on my network, I navigate to it and start copying files. This is reason enough to hate every other smartphone and tablet on the market. This is both obvious and amazing to me.

Extending that is downloading files from the browser. If you download office files, you can open them in the msoffice-like apps that are preinstalled. If you download a PDF, you can open it in the preinstalled acrobat reader. If you download a zip file, you can just save it until you want to transfer it to your desktop PC. Again, it's both obvious and amazing. Not something you will find in iOS.

The plane ride was good, I played with the browser in the airport, I watched over an hour of video on the plane, then that night when I was showing it off at the conference, the battery was around 80%. Even trying to give it somewhat heavy use, I can't kill the battery in less than 2 days. I don't have the patience to use it continuously for long enough to tell you a real answer. I did manage to kill it today finally - two full days of use, on and off, and finally watching high-def videos made it happen. As far as I can tell, there is no global messaging system, so it didn't let me know the battery had reached 0%, it just started to shut down.

The cameras are there. Front & rear. I got a mixture of quality all based on lighting. Normal indoor lighting is very grainy, and outdoor shots look like a digital camera, but are usable. The worst part is the delay when taking a photo. Let's say I hit the button when you started reading this paragraph. It actually took the photo right about now. *click*

PlayBook photo from the Hyatt 23rd floor.
From the Hyatt 23rd floor, overcast daylight gave a pretty good shot.

PlayBook photo, Marc Esher shot Ben Nadel.
I think Marc Esher shot Ben Nadel here. Notice how it was the camera delay that caused the photo to come out blurry.

The worst thing of the whole experience, and mind you I am coming from an iPhone, is the text editing. The keyboard in landscape is too small for my hands, too big for my thumbs, so I have to peck at it. In portrait it is about right for two thumbs. That's fine, but actually editing text, selecting text and moving the cursor is awful, even unusable. Fixing misspelled words and automatic capitalization is nonexistent. You can tell when I tweet with it because there are no capital letters and [space][space] doesn't insert a period. It took Apple a number of years to get to where they are now; I hope it doesn't take that long for RIM.

There are a few things I haven't even tried yet. I understand it does HDMI video out in the background while you can do somethign else in the foreground, like play a game while your wife watches a chick flick (you heard it here first, folks). Also if you have and love a BlackBerry phone already, BB bridge gives you mobile internet and access to your phone's email & contacts. Yeah, I'm not doing that.

Bonus: I discovered a few tricks that you may not know. First, you can take a screenshot on the PlayBook by hitting the [Volume UP]+[Volume Down] buttons at the same time. Second, you can navigate the local hard drive using the browser by going to file:///. I created an HTML document with my speaker notes and uploaded the files to the PlayBook, then navigated to the local file in the browser - that gave me an offline copy of my presentation notes to use on stage. Sweet!

To summarize, I am very thankful to RIM for bringing me this new toy. As far as a consumer device goes, it's a game of contrasts - the PlayBook has the best tablet browser that I have seen anywhere, but the worst text editing, the best multitasking, the worst app store, the best file sharing and management, but a lame camera. The foundations are laid for something incredible. I like this device. I really do. Its strengths are worth taking a look at in spite of its shortcomings. And with that, I'm keeping it, and I'll show it off to anyone with eyes because it's so dang pretty.

PlayBook photo of Elly reading a book.

(Discuss with Disqus!)

I was going to diss client variables...

posted under category: General on April 26, 2011 by Nathan

A couple months ago, an edict from on high (AKA my company's enterprise IT infrastructure middleware hosting support department -- it's a big company) came down that said in order to host our applications on the new ColdFusion 9 server cluster, we have to stop using session variables and switch to client variables.

I have a rage-induced past with client variables (and here). To say I am not a fan does not do it justice. Forcing me to consider them does not make me happy.

They sent us all a document detailing how to do it. It's easy, (1) you just do a find-and-replace to turn session.* into client.*, then (2) watch Nathan's blood boil with pure hatred.

The reasoning behind it was simple (meaning both obvious and dull-witted). The new server environment is clustered, if one server crashes, we'll lose our session, but client variables will live on in a shared client variables database. <red flags>! I could rant for a few days about the policy. There are a number of other factors that increase the fallability of the recommendation, including the use of our single sign-on service, use of sticky sessions, the fact that I tend to put components into the session scope, and on and on.

So I wrote.

First, I wrote some code to get around the entire fiasco without using a single stupid client variable.

Then, I started writing in Evernote. I have about 5 printed pages worth of blog material. I was going to blog it all, it was going to be epic. Then, I saw there were lightning talks at CF.Objective() 2011, and they needed volunteers for speeches. I pitched the Client Variable Ultimate Smackdown and was accepted! Now, I'm saving the blog-rage for sometime after May 12th-14th, and instead you should come see my lightning talk on client variables on Thursday May 12th at CF.Objective()! LTs are a lot more informal, but it's going to be a lot of work for me. I'm really excited to be speaking twice now!

I'm trying to treat my Lightning Talk a little like a melodrama, a little like a speech to anger everyone, a little like just sharing something that interests me, and a lot like revealing the shocking evidence on why client variables are probably the worst aspect of the ColdFusion Markup Language.

See you there!

---
Update 4/29, They officially announced the lightning talk speakers!

(Discuss with Disqus!)

Book Report - Driving Technical Change

posted under category: General on March 28, 2011 by Nathan

The last book in this mini-series of book reviews (my wife laughs when I call it a book report), is the Pragmatic Programmer's book Driving Technical Change by Terrence Ryan. I know Terry as the Adobe evangelist for ColdFusion, so as a user group manager, we talk some.

Driving Technical Change is an interesting book because it's essentially a people-skills book for nerds. As I read through and discussed it with my aforementioned better half, it became evident that the basic strategies outlined in this book are something that she does every day, almost without thinking. It's a great thing to do, just not something that would have ever occurred to me.

The format is simple. You get to know a person, figure out what kind of social dysfunction they have toward you, then treat them in a way where they get what they want while you succeed with your agenda. The book is actually like a social reference for people who get in the way of technical progress. I put my copy on my shelf at work because that's where I run into these people.

Overall I liked it, on the immediate side because I could vouyeristically classify my co-workers (past and present), and on the long-term side it will be an ally for helping to share my technical position at my day job. See, I work at a big company, 160,000 or so employees. My technical agenda tends to be advocating my programming platform of choice (plus other favorite complimentary technologies as mentioned in the book) as well as my own application that I am trying to roll across the enterprise. Not everyone is as receptive as they should be, so this book is a practical perfect win.

It's an eye opener and a nice read. It went by pretty quickly, too, which means it didn't sit around a long time as big books seem to intimidate me. You learn more about the book at the publisher's site, and pick it up at Amazon for about $22 at today's price.

(Discuss with Disqus!)

Book Report - Object-Oriented Programming in ColdFusion

posted under category: General on March 21, 2011 by Nathan

I am finally up to books that are new in the past few months! This is Matt Gifford's new book Object-Oriented Programming in ColdFusion. I know Matt, he's a great person, and that alone is reason enough for me to pick up his book. Problem solved. I recommend it. End of discussion.

But, who do I recommend it to?

Object-Oriented Programming in ColdFusion starts off with the lighter stuff, CFML tags and concepts that enable object-oriented development, but then includes enough of the gritty details so you don't hang yourself as soon you realize how much rope you've been given. It is very commendable how much of the important facets of CFC development Gifford fits into such a quick and entertaining first pair of chapters.

After the basics and theoreticals come the practical use. I love the way this book shows how easy it is to gain an advantage using OOP concepts. Real life discussion and demonstration of Beans, DAOs, Gateways and Services to complete the journey.

This book is very practical. It move straight from book to brain to program in a way that most will be able to follow and with a formula that will bring you near-instant success.

If you do ColdFusion development and want to know why there is all this fuss about object-oriented programming, you need this book! If you have some OOP knowledge and wanted to translate it to a real program, get it. If you are struggling with the right way to design your objects, this could be your key to success. Also, if you've been doing OOP for a while and want to know if you are doing it right, this is how you find out.

On the other hand, if you are one of the elite few hackers that invent new names for types of classes because they haven't been invented yet, maybe you don't need it. If you are an OO purist who hates to see when someone uses inheritance over composition, you may not be helping yourself by reading through.

Over all, I hope that this book makes it into every store shelf that holds a copy of any ColdFusion book. The information here is so useful, so helpful, so good, I wish everyone would follow Matt's recipes for successful object-oriented application development - the world of CFML would be a different place. Applications would all make sense. All of our concerns would be separated. All of our knowledge would be well encapsulated in our models. Simplicity would reign. Think of the children! [maybe I'm going too far with that last one... how about this:] Think of me! I don't want to maintain another awful CFML app. Buy this book already! That's my plea. Thank you.

You can learn more about it at the publisher's site, or you can pick it up at Amazon for about $35 today.

Finally, if you want my copy, I plan to give it away at the AZCFUG meeting this Wednesday (March 23). I'm a polite reader and it's in almost perfect condition. Show up if you want it.

(Discuss with Disqus!)

Book Report - JavaScript: The Good Parts

posted under category: General on March 20, 2011 by Nathan

Another book I finished on my path to even getting to the books I scored over the holidays was JavaScript: The Good Parts. Let's see, how can I describe a book like this? Maybe like so: this book should be required reading for web developers before ever touching a script tag or js file. Of course we know the entire Javascript domain is riddled with bad code and bad parts, which is why a book like this is necessary.

JavaScript: The Good Parts is the ultimate Douglas Crockford book that shows this man's mastery of the JavaScript language. I've seen him speak a number of times thanks to the Yahoo Developer Network's YUI Theater. Crockford knows his stuff, it's impressive, and to have it all in text makes this book a real treasure.

The book takes a walk through JavaScript as a language, how to use the best features, the best way. It makes our old friend (or enemy!) JS really feel like something that wasn't hacked together in the Netscape basement over a decade ago (even though it basically was). A lot of attention is given to object & function composition, as it is a tricky subject especially in Javascript and something you need to figure out before you get too deep.

Crockford has some amazing quotes, too. Here's one from my favorite chapter, Chapter 9: Style, on the subject of how we format our written code.

JavaScript allows variables to be declared after they are used. That feels like a mistake to me, and I don't want to write programs that look like mistakes. I want my mistakes to stand out.

A word of warning, this book is for the true hackers. If you are getting into programming for the first time, don't even try it. If you are still working on the mouseovers for your first web site, this book won't do you any good. If you can't see where the DOM ends and the Javascript language begins, maybe practice up a bit. This book is about programming, not about web pages.

I read the book through Safari Books Online via the Safari browser on my iPhone. The good part was that it didn't log me out even once over the course of the 5 months I had the tab open (so it took me a while, did I mention I have kids?), and the mobile formatted site is great. The bad part was that every time I re-visit it after a few hours, Safari reloads the page; I have to wait for all the assets to download before I can continue. They need an app for that in a bad way.

Again, it's an O'Reilly book, so you may be able to score a copy from your local user group in trade for a publicly written review like this. If you like the sound of it, you can pick up JavaScript: The Good Parts from the publisher's site or from Amazon, a steal at about $17 today.

(Discuss with Disqus!)

Book Report - Head First Design Patterns

posted under category: General on March 19, 2011 by Nathan

I've had the great pleasure of taking extra time to read this year. I had a few books given to me at Christmas, so I've been polishing off as many books from last year as I could, in order to get to this year's books. The First victim on the list was Head First Design Patterns.

I'm a huge fan of the Head First series. The first moment I saw Head First Java at my local book store, I bought it. The helpful, irreverent, comical style of the Head First series was a great change from technical books I had seen before. I sped through it, did all the puzzles, and learned a load of Java. I loved it. Not long after, I went through Head First Servlets and JSP and Head First EJB, both benefits to my web development brain, but because I don't do servlets, JSP or EJB, it was really more theoretical. I decided to bring it back into the realm of something I could actually use.

Head First Design Patterns uses the same tone, the same kinds of jokes, the same repetitous learning style that works so well, and it covers a range of design patterns as implemented in Java. Because Java is so similar to CFML, the translation to my world was easy. Also, it's not so code heavy that you need deep knowledge of Java.

The book talks through common problems we face as programmers, and the most common strategies we can use to solve them. The majority of the book is talk about these patterns - the strategy pattern, the observer pattern, the factory pattern, and other important blueprints you should know about.

One of the strange things for me was that I had already implemented a lot of these concepts. I was doing a lot of things right before I knew the name my pattern goes by. The rest of the time reading, I spent thinking about how I was doing it wrong. It opened a lot of doors that I otherwise would not have known about.

If you know a little about object oriented design patterns, or you always wanted to, I recommend this book. If you are trying to get into Object-Oriented Programming but haven't figured out how to make your objects smarter, this could be your savior. It's smart without making you feel bad. It's hard concepts boiled down to casual conversation.

Another cool thing, the book comes with a giant design patterns poster. I hang it right next to my desk and look to it when I need inspiration working on my object-oriented designs.

If you like the sound of Head First Design Patterns, it is available from O'Reilly, or where I bought it, on Amazon (down around $25 when I wrote this).

This being an O'Reilly book, you may be able to get a free review copy through your local user group. The catch is you have to type and post a review of your own like this one. Check with your user group manager.

Next up is Javascript: The Good Parts, finished just this last week.

(Discuss with Disqus!)

How to get a free BlackBerry PlayBook tablet

posted under category: General on November 17, 2010 by Nathan

If there's one thing I know about programmers, it's that we love toys. Whether its Legos or smartphones, we love them. The next season's most promising toy that I've seen is the BlackBerry PlayBook tablet PC. Seriously, it's peppy and I want it. Mine is on preorder, and yes, I have a total bias because I'm getting it for free, but I don't want to be the only one. You can have it, too.

RIM currently has a giveaway program. It's simple: you make an app for the PlayBook and get it into their App World (aka the BB app store) by launch time, and they will send you the device. This developer promo is for real, so get started early. Here is the PlayBook dev overview page and the PlayBook developer resources page to get you going. I am starting with the webcasts from that last link.

Maybe it's a little ironic, you have to develop an application for a vaporware device, test it, deploy it and only then get the device, but I would argue that it is worth it. Having seen it in person, I will testify that is is a really nice toy, and I'm not above acting the shill because I really do want it to succeed.

(Discuss with Disqus!)

The Single Greatest iPhone Ringtone Ever

posted under category: General on April 15, 2010 by Nathan

It's a simple concept, really. Think about it. What sound makes you sit up a little straighter? What sound makes you want to run forever? What sound makes you want to kick a turtle more than anything else you have ever heard in your lifetime?

The answer is obvious. You must be thinking of the invincible music from the original Super Mario Bros, circa 1985. As soon as you picked up the star, nothing could stop you. Fire breathing plants and flying fish fall by your wayside as you don the seizure-inducing clothes.

As a ringtone, this invincible music will own your attention every time. Your eyebrows will lift. Your heart will beat a little faster. Your hands may sweat.

As a final insult, as if you needed it, when you don't answer it soon enough, it goes into one minute left double time music. Yes, that's invincible on speed. Your b-sprint finger cannot handle ringtones of this magnitude.

USE WITH CAUTION

Download this Mario Bros Invincible iPhone Ringtone now!

It's 500KB, m4r, just add it to iTunes, sync and change your ringtone global or per-contact settings. I made it with Adobe Soundbooth using a free wav file I found somewhere, and I converted it to m4r with audiko.net. Not responsible for damage.

*Update: By request, an MP3 version for you lucky ducks using Android phones. 400KB.

(Discuss with Disqus!)

Reminder: Talk about the basics (and 6 reasons to do it)

posted under category: General on February 11, 2010 by Nathan

We tend to forget about the basics. Once we've mastered them, we move on to whatever else interests us. When beginning a learning project, we grow the most, we post the most questions, answers and blog entries, and we talk about our beginner problems the most. Later on, we stop talking about what it's like to get started, and for good reason, we're not getting started. It's out of sight, out of blog.

Take me, for instance. I have become so wrapped up in OO, design patterns, frameworks and extensibility, that I've nearly forgotten there are loads of new developers out there, hoping to learn something from the likes of me.

But big deal, why should we even talk about the basics? Well lucky for the universe, I've compiled this list, because we all love lists.

Talking about the basics...

  1. Gives you something to blog about
    I have like 2 posts for the entire year so far. I need some new subjects.
  2. Ups your search results ranking, bringing more traffic to your web site
    And who doesn't want more traffic? Not me, man, I want it all.
  3. Increases the stability of the global knowledge on the given subject
    Maybe esoteric and meta, but it's true. Sometimes old resources go dry, while new ones are usually prettier.
  4. Increases the keyword rank
    Increase the google trends ranking. Increase the general popularity of your subject. Get uninitiated people interested in a "that looks easy" kind of way.
  5. Gets uninitiated people interested
    If you have them saying "Hey, I can do that, it's easy" then you can add to the numbers of those working in your world.
  6. Guarantees your high place in the minds of the unknowing
    Readers like a hero, and you'll like people coming up to you, years later, expressing their gratitude.

So with that, I hereby to promise to talk about (at least a few) easier concepts, (at least a little) more often. I'll use this blog to do it. I promise to use my position as a ColdFusion software user's group manager for the benefit of newer programmers and recent and future converts.

(Discuss with Disqus!)

Like puzzle games? iPhone & iPod Touch users, try Relix

posted under category: General on January 4, 2010 by Nathan

A good friend of mine (and ColdFusion developer [see how I'm on topic {note the stylish use of nested parens}]) at work has been hitting iPhone development on his spare time to come up with this game Relix. I've been playing it tonight and am thoroughly perplexed at some of these puzzles, like level 12:



It's been fun playing it, and it's only a buck, on the app store now, plus you'll be helping a fellow programmer, one of the 'little guys.'

This should link to it - Relix, the puzzle game for iPhone & iPod Touch. Oh, and do check the video, it makes starting off way easier.

(Discuss with Disqus!)

Should You Go 64 Bit?

posted under category: General on November 6, 2009 by Nathan

In case you have trouble deciding if a 64 bit operating system is right for you, I give you Should I Go 64 Bit? which should finish the argument once and for all.

If you buy the upgrade to Windows 7 (which you should), you will be forced to choose - it comes with 2 DVDs, one for a 32 bit install, and one for 64 bits.

Should I Go 64 Bit? is the quick and dirty answer.

The long answer is more complicated, but I have boiled it down to your computer, if you have 2GB of memory and a 64 bit CPU, take the plunge. The only 2 caveats you may have will be software compatibility (if you have any 16 bit software, it will no longer run in Windows 7 64 bit), and hardware driver compatibility. Chances are, if your hardware is so old as to not work with Windows 7, you need to upgrade anyway, and if your software is so old, you can always virtualize.

(Discuss with Disqus!)

A few miscellaneous upkeep things

posted under category: General on September 15, 2009 by Nathan

First up, Twitter. Follow me: @nathanstrutz.

Second, Facebook: Friend me: nathan.strutz.

I guess you could have figured that out, though, if you visited Hi, I'm Nathan Strutz. Hi.Im is very cool.

Finally, MAX. I couldn't talk Boeing into sending me to the annual Adobe MAX conference. I'm not sure I will ever get them to send me anywhere. There is a chance I could hit a conference if I'm a speaker, so I'll be coming up with some kind of presentation that people would like, and maybe try out for a few next year.

There is, however, the Adobe Community Summit, which is held Sunday, October 4th, right before MAX. With the price so very right (free), and the location close enough (L.A.), I'm sure I can get there.

This ACS day happens to run only a week after I bring the family home from 10 days in Alaska. We've got a lot of friends and family to visit, wish us luck with 4 kids on a 6 hour plane ride.

Anyways, if you're an Adobe ACE or UGM, and will be in L.A. in October, make sure to meet me at Community Summit day!

(Discuss with Disqus!)

Microsoft is on fire

posted under category: General on June 4, 2009 by Nathan

Somehow, Microsoft is the new hotness, hitting nearly every shot they throw out there. According to my favorite game (well, from 1994) NBA Jam, the're on fire.

Windows 7
It's Vista. It just is. It took like a year for them to make it, which is nothing in comparison to Vista's decade dev cycle. They didn't re-do anything, and it's not faster, but the fact is, it's what people want, and they're loving it. The only negative things I've heard are from those who are trying to run it on their macs. Hah!

Bing
Stealing, err, rebranding basically everything from Live Search, Microsoft comes through with a word that people like ("Let me Live Search that for you") and a searching experience that, for some unknowable reason, people like. Google may have the first competition since destorying Yahoo all those years ago. Personally, I'm not convinced, but people are talking.

.NET becoming superior
The programmers have been the core of Microsoft for a long time, but it wasn't until the recent .NET framework 3.5 (and service pack 1) that they gave them Linq and MVC. These tools are finally something on par and superior to the competing Java platform. The quick movement of both C# and VB.NET have thrown these languages much closer to the top of the "cool" stack.

XBOX 360
Ok, second to Nintendo's invincible Wii is a fantastic place to be. The recent exclusive content is a real winner, and the games are head and shoulders above anything from Sony, aside perhaps from Little Big Planet. Further, their just-announced Natal project, which essentially gives you the Minority Report interface for your TV, is just, well, "Ka-boom" (in my best NBA Jam announcer voice).

Of course Microsoft has a number of smaller successes, things that have really started to go right but aren't as big. The XBOX update with mii-like avatars, Netflix on the XBOX and Media Center, and the re-invigoration of the browser war, giving us IE8, which, if nothing else, sucks less than IE7 and 6.

That doesn't mean everything they do is the bomb. I'm not about to go out and buy a Zune or a Windows Mobile phone, I'm just making observations.

(Discuss with Disqus!)

Managing your application's emails

posted under category: General on April 3, 2009 by Nathan

Here's a recurring problem I've discovered. Many, if not all, of my applications send email, and they tend to do it in an unmanaged, un-object oriented type of way. For instance, if you comment on this blog entry, I and other subscribers are sent an email. The template for this email is tucked away inside a CFC, right below where I insert the record into my database. This, of course, is a problem that can be solved in a repeatable, managed fashion.

I have actually solved this problem before at a previous company I worked at. Obviously all of that code is under lock and key, unusable due to NDAs and basically unethical anyway, so instead, I am planning on recreating something like it, but better, from scratch. Hey, if nothing else, I'll just use it on this blog. Of course I'm talking about open sourcing it - why would I tease readers with a cool toy, and not share it?

Overarching idea: A reusable open source library and API for both the management and sending of emails via templates.

Basic requirements:

  • Manage storage of email templates (CRUD basics, consider varying storage options)
  • Allow dynamic variables in email templates (Dear #user#)
  • Create basic administrative UI, key on easy integration
  • Create simple API for sending email

Groupthink questions: Does anyone else do this? How do you solve it? Why have I not heard of anyone else doing it?

Final thoughts: Sending email from your application is a scenario that I see often, and can be handled by an administrative managed, reusable application. Move your email templates out of your code and reduce the complexity of your application.

Oh, and I don't have a name for it yet. I'd hate to call it the Email Template Manager or something stuffy and boring.

(Discuss with Disqus!)

My experiences working with Google Docs Presentations

posted under category: General on March 5, 2009 by Nathan

I gave a recent presentation for the AZCFUG on Ant and Groovy. One interesting point about it was that I used Google Docs to do the whole presentation, including creating it, presenting it and publishing the slides the next day. Here are my thoughts, weighed out in a pro / con table.

The BadThe Good
Lack of fancy special effects or animations, only a single text fade in effect.No eye-gouging awful effects, the text fade looks nice.
Somewhat slow editing, just due to the fact that it's online instead of local, and it's HTML and Javascript instead of a native desktop application.Not so slow that it matters, will improve with the faster javascript engines coming in 2009.
Also, the features keep coming as the tools improve, no need to wait for the next $900 release of MS Office, incremental changes are just weeks away.
Have to be online to use it.Collaborative editing, collaborative viewing (I didn't use either of these, but may, in the future). Can access the presentation from anywhere on the internet.
Presentation mode has awful white lines on the top and right side, and a black utility bar at the bottom (I was using Firefox).The fact that it even has an online presentation mode is great.
The utility bar is very handy, not terribly in the way.
Can't control the presentation next/previous from the presenter's screen (when presenting with dual-screens). Controlling the presentation on the primary screen requires clicking on the slide, where the cursor gets in the way, or by clicking on the arrows in the lower left corner. These arrows can get in the way of the content. Either way, I would rather not have the cursor on the presentation screen at all.Speaker notes pop up in a separate window for dual-screen presentations.
Unlike Flash's full screen mode, it doesn't go back to the embedded size when it loses focus.
Unlike QuickTime or other embedded media players, it is very predictable.
Published slides required an iframe tag on my HTML Strict doctyped web site. Would have liked to foce visibility of my speaker notes on the published embedded slideshow.Published presentation was 1 line of HTML and was all HTML based (as opposed to Flash). Can publish on a web page, but viewers can get closer and use the full-screen view, see the speaker notes and even download it.
Exporting to a PPT file lost my gradual loading effects (eg. show 1 bullet at a time).It can export to PDF and PPT with fair enough quality. I had done this for a just-in-case-the-internet-fails backup. Plan B would have been degraded, had I needed it.
Less features than PowerPoint.Less annoyance than PowerPoint.
Had all the features I needed, not much more to get in my way.
It was evident, in stark opposition to PowerPoint, that this was about content and presentations, not about useless frustration, lining up pixels or worrying about fonts.
Limited design templates.Current template selection was adequate, I found one I liked.
Minor UI annoyances:
  sometimes wonky box selection
  smallest font size too large
  limited link type selection, no linking to slides, documents
  no shift-drag for straight line object moving
Great UI examples:
  drag & drop slides
  context menus always had the right actions
  so solid and easy, I didn't even consider using the help system
Interface was not customizable like MS Office, move toolbars, etc.Not bothersome, as it felt so good that I wouldn't want to change it around.

Overall, I had a great experience. Google Docs is constantly moving forward and this latest version of their presentation system was fantastic. I will definitely be using it in the future.

(Discuss with Disqus!)

The problem with Microsoft's software platform

posted under category: General on December 19, 2008 by Nathan

I've got a fever, and the only prescription is a bunch of ranting run-on sentences...

See, here's the problem with Microsoft's software platform, especially relating to ASP.NET, but they keep doing things like this: they went from having no MVC, where web sites feel like desktop app programming, except with HTML, which really just makes no sense whatsoever and is a retarded paradigm to program for even though they pulled it off fairly well even from the first version, to finally having some basic MVC support; things that the rest of the programming universe have been doing and loving, where they finally addressed the issues where they just suck at, acknowledging that maybe all the programmers out there in the world are smart and are basically right and that the feeling of needing to make maintainable applications that aren't ridiculous to update and work with and acknowledging that letting the developers do the HTML, CSS and Javascript to do their web-based apps might be a good thing because after all, they probably work on a team with designers and deselopers and the like and the developers have to eventually be sick of the stupid paradigm of being forced to use ASP.NET's web controls and having those things write all their tables and login forms because the code those output just really sucks and they can't get in and fix it and make it look like the designers really wanted without sacrificing a lamb, by introducing ASP.NET MVC late last year, which would finally let Java programmers in, and maybe even ColdFusion and Ruby guys as well because they can all do MVC even though ASP.NET couldn't, and would also just make the platform much more approachable by traditional web developers who understand the request/response model and who like to get their markup right enough to validate and who are always annoyed by Microsoft's web stack getting in their way because there's only 3rd party support for making a normal web site instead of postback and having the whole page be a form, which again, makes no sense, ok, from that, straight into the ASP.NET MVC Design Gallery, where the traditional ASP.NET desktop software developers - and yes, I said they make desktop applications in ASP.NET because there's no other real excuse or explanation for what you're doing when you work with ASP.NET except that you're posting back and responding to events exactly like a desktop app in visual studio where you double-click on a button and write a codebehind action for the click event where it makes sense for desktop applications but falls utterly flat on the web unless you actually are doing something special with the button's onClick event like popping up a 'loading' image so the user doesn't hit the link again - now they can download and apply a pre-made design so that suddenly your MVC app is friendly, and you don't really have to do HTML and CSS because that's for web people, and programmers aren't web people, they're programmers and shouldn't have to learn html because it's somehow too difficult to understand for a programmer because after all, the programmers doing ASP.NET and dragging their little web controls onto the stage and shying away form the HTML probably actually are too slow to learn something as 'challenging' as the div and span tags, or at least Microsoft has somehow formed the permanent opinion that they are and they coddle their developers and pet them on the head and say "it's alright, you don't have to do HTML." If you commit your life to programming on the Microsoft platform, I would pretty much promise you that you will never have to learn HTML, Javascript or CSS, just C# or better yet, VB because then you can do vbscript too and program in classic ASP or make windows scripts and macros for Excel which is really all your business wants anyway. Imagine a programmer who never learns anything about what they're doing or what platform they're working on, then imagine armies of them crying and whining until Microsoft gives in and releases something that takes them from zero to hero, but you have to do it this one certain way and whenever you deviate off the path you're out of range, even for some clever googling because no one else has ever gone that path and that error number is so obscure that Microsoft would really rather that you never saw it so the MSDN page for it says something about how to get back on the right course because you tried to change the font tag to a span with a class and they didn't expect you to know what you were doing so you should leave it because, after all, IE v.16 still supports the font tag even though firefox had disbanded it 22 years after the standards committees threw the tag out and they figured no one would actually have software that generated a font tag because that would be ludicrous.

Dear Microsoft, make the developers on your platform grow some brains and learn a little about HTTP and a little about forms and links, where the Javascript goes and where CSS fits in, and how to write a multi-page form without postback (even though postback is a clever solution). See, it's too hard to know why we would implement a pattern (like postback or MVC) until we've suffered without it. There's no reason for an ASP.NET desktop programmer - yeah, i said it again - to switch to MVC (other than it's new and now has a design gallery) because MVC doesn't solve any of their problems, and MVC is better for making web applications that work together and have reusable parts and are well managed but it's not so good for just web pages, and who knows, I'm sure there will always be a market for those end-developers who really just want a web page with a login form and a table from the database and they want to call it an application even though the only cohesion it has with the rest of the pages is a link to another page and it has no reusability or management from the standpoint of the application as a whole and all the code is on the page or in a partial class which might as well be on the page except that now you have to have 2 files open in visual studio as if to prove the point that Microsoft is always trying to solve the wrong problem. Maybe if you allow ASP.NET to really be a part of the web instead of this alien spaceship that visits the web when it feels like it, then we'll drop some of the dead weight out of the programming chairs, as if the programming industry could downsize itself based on IQ, or better yet, it would let people learn some of what's really going on and how technology works and would excite them and make programming on your platform as fun and rewarding as we all know it can be like when you solve your first big problem and even though your manager wouldn't ever understand the programming difficulty you just overcame, you know you did it and you did it well, and it's 4:50 Friday afternoon so you can free your mind to have a relaxing the weekend and everything just feels right.

I like ASP.NET MVC. I really do, but I do not think it should be the first point of entry for a new developer getting into web development. I even somewhat like ASP.NET and web forms, although, I suppose in another way, I also despise them with the fire of a thousand suns, so it's maybe 50/50 what I'll feel depending on my caffeine intake for the day, but I don't think ASP.NET and web forms should be a new web developer's entry point into web development. It just isn't right. What is right? JSP is close, as it's still fairly modern and can be upgraded into an MVC pattern (many frameworks are available) as the developer matures, except for the complexity, specifically with getting your server up and running, and learning about beans and stuff, it's just overkill and that is a rant for a different day. PHP would work, except that when you look at the language you see C versus Perl with an out of control language library that could choke three camels. Ruby on Rails is a magical UFO that does MVC - too much code generation that hides what the world wide web does, not a good starter. Classic ASP, not really a language as much as a lightweight platform, and it's coupled usually with vbscript, I would say avoid it because, while not technically end-of-life, it hasn't seen any activity since ASP.NET came out in 2002 and is no longer considered modern. That leaves us with ColdFusion, which is perfect with its syntax that's similar to HTML and javascript without performing any type of web magic that can't be deduced by just looking at it, easy debugging, easy database connections, the ability to move into object oriented concepts and some well supported frameworks that give you as much MVC as you can wish for. As much as ColdFusion is touted for its ease of programming, it also doesn't hide the real web from you - it just makes it easy to get to.

(Discuss with Disqus!)

Integrating 3rd party applications into yours, safely

posted under category: General on October 30, 2008 by Nathan

Reuse-in-the-small is a solved problem. Reuse-in-the-large remains a mostly unsolved problem.
Jeff Atwood from Robert Glass, Facts and Fallacies of Software Engineering

I'm actively hacking at my latest toy project, which integrates a few 3rd party projects, and I had the thought, integrating a library, like jQuery, is drastically simpler than integrating a whole application, like a discussion board or WYSIWYG text editor. How do you solve these problems?


A few years ago I attempted to drop Ray Camden's Galleon Forums into another project. My app was Fusebox, so I had to rewire some of the front end, then move the component calls back out to the circuit. Sounds fairly easy, but with 3 gaping problems.
1st, the client calls and we have to modify it heavily. It turned out the only thing Ray's app was good for, was a starter kit on the database and DAO templates.
2nd, Ray puts out a new version with features we like, avatars, BBcode and signatures. We were so far out of sync that there's no way we could implement his new version.
3rd, I was never sure how stable the rewritten code was (turns out it was ok, but I was crossing my fingers).

Result: Thanks for the starter kit, now I'm on my own.


Fast-forward a few years to my new project, and I've started integrating Edit Area, a javascript code editor, into my application. Edit Area presents a few challenges, including the build program written in PHP and the authors not being native English speakers. Also, I have some application requirements, such as no externally linked files, and oh yeah, it has to work right (grrr).

So, how do I make changes to the application while keeping myself open to future versions?

The method I chose was to make changes to Edit Area in my build file. Ant calls Groovy. Groovy reads in their file and turns it into my file, which my program includes. It is repeatable but not destructive. When the next version comes out that fixes some of my problems (and I do hope it does), it will be mostly zero effort to update my code. Their changes could break my build temporarily, but I can tweak and adapt.

The biggest issue here is the challenge of meta-programming, or programming programs to reprogram programs. It's a lot of trial and error to get it right, and a lot of regular expressions. Also, Ant isn't exactly a real programming language, so I have Ant run a Groovy script. It's initial complexity to solve a repeating problem, which is a fair trade to me.

Result: Brainiacs only, but it works well.

(Discuss with Disqus!)

Required training 2008

posted under category: General on July 29, 2008 by Nathan

At work, we are required to take 5 days of training this year. This is a challenge for me on a few levels. First, I have a new baby at home, so I don't want to leave the Phoenix area. Second, I'm having trouble finding classes that are open and applicable to me.

I have a SQL Server background, and I'm using Oracle, so I tried to get into a good Oracle class, but it was cancelled, so now, I'm weighing Java and .NET among others.

Unfortunately, at this point, it's quickly turning into an annoyance that i just have to 'fix' instead of the terrific learning opportunity that I'm sure it was meant to be.

If anyone has any suggestions, I'm all ears.

(Discuss with Disqus!)

Upgrading my HTPC

posted under category: General on July 15, 2008 by Nathan

With my old MCE experiences blogged, now it is time to discuss my upgraded Media Center PC. No, we're not going Tivo, that would be ridiculous. We are, however going completely off-the-shelf this time. For not much more than the price of a nice Blu-Ray player, we purchased a PC with one included, from woot. Here are the key PC stats:

  • Quad-core CPU, perfect for encoding and decoding video, and doing multiple tasks all at once, but higer electricity costs
  • Windows Vista Home Premium - I hear the upgraded media center software is fantastic
  • 3GB of RAM - 10x more than I ever used on my old HTPC, but will be nice because of Vista
  • High-def TV tuner with cable and atsc inputs - I doubt it has hardware MPEG encoding, but the recorded content will be mostly standard definition cable
  • Blu-Ray/HD DVD combo drive - I guess it was a clearance item
  • Two, 500GB SATA drives - 1TB total. If it has an IDE channel, I might bring over a 320GB drive from the old DVR
  • Card reader - a big plus, considering it is our digital photo center
  • 8-channel audio - I wish it was digital audio, but it is an upgrade from 6 channel

Additionally, we made 2 changes in the home network:
  • We upgraded the router to 802.11n - now file access will be faster from other PCs
  • We moved the router and cable modem over to the entertainment center; now the HTPC connects via 1Gb ethernet, as it has no WiFi adapter

Overall, this will be a good, much needed upgrade. We've been enjoying having an XP media center so much, I think that with a faster CPU, it can only get better.

(Discuss with Disqus!)

My Media Center experience

posted under category: General on July 10, 2008 by Nathan

A couple years ago, I wrote about my experiences with building my first Media Center PC - a low powered, half-purchased, half-constructed PC, DVR, file server and entertainment center based on Windows XP MCE. Since then, I've discovered a few things that have been working really well, and a few things that have not. These are my experiences.

Things that worked really well:

  • Low powered CPU - budget-wise, has been nice on the electricity bill, considering this PC is on 24/7
  • Purchased instead of built the core components - this gave me rock-solid stability, rebooting mostly just for an occasional sound glitch
  • Recycling old IDE HDDs - gave me about 750GB of total storage
  • DVD cataloging - We just put unwatched or often-watched movies on the HDD so we don't have to relocate the discs
  • uTorrent's WebUI - I can access it from my desktop PC, which is only on occasionally, and have my media center download torrents 24/7
  • MCE's movie library - allows us to access DVDs, Divx and home movies across multiple HDDs
  • File server as a central location for our gigantic digital photo library
  • 6 channel audio - even though our receiver supports 7.1, we only have a 5.1 speaker setup anyway

(jump break - things that sucked up next)



Things that did not work so well:
  • Low powered, single core CPU - clocking in at 1.4GHz, I have roughly enough CPU to record 1 live TV show and, just barely, watch another
  • Single TV Tuner - I want to record more than one show at a time - Windows can handle more, the CPU can't
  • Nero software - burning shows onto a DVD was incredibly time-consuming. Again, this is probably CPU related
  • Inability to play HD content - my plasma TV loves it, but the CPU is too weak - I get low frame rates, then the audio stutters, then the video
  • IDE HDDs - No SATA support means I maxed out my available IDE channels with 3 HDDs and a DVD drive
  • 802.11g with a cheap USB 1.1 adapter - it is online, but moving files across then network is slow
  • Web Guide - Microsoft's free software to access MCE functionality over HTTP has CPU and network bandwidth requirements beyond my setup
  • Media Center music library - my hundreds of albums slow the library to a crawl while they are fine in Windows Media Player
  • Access permissions between users and PCs is annoying with workgroup networking, and having a domain server is overkill

Other miscellaneous thoughts:
  • I have about 640MB of RAM, which doesn't seem to even matter; I rarely use more than 300
  • The Windows MCE license came from an MSDN subscription, and I did do some development and testing with it, but I'm probably using it for more than the license permits
  • I had originally tried to use Ubuntu + MythTV, but gave up in compatibility and configuration frustration
  • Thanks to my CPU issue, I can't even consider upgrading it to Vista

My upgrade is coming soon...

(Discuss with Disqus!)

What is Nathan doing?

posted under category: General on June 18, 2008 by Nathan

My mother-in-law passed away last month, and I haven't really had anything to say here since then. I have some pre-written stuff, I just didn't really feel like posting it. We're still coping with the loss.

At work, I just got a major release out of the way. It was 6 months in the making, so my boss is prodding me to become "agile," as in, regular releases with smaller changes. I agree, so I'll be experimenting with it. A year or so ago we had a client who demanded us to work with their agile process, which was just a huge, uncomfortable time wasting disaster. It makes sense in development teams, not so much in a business end where you're paying developers in another company, halfway around the globe, by the 6-minute increment to sit in your daily hour-long "scrum" calls. That was just set up for failure from the start.

I had some thoughts on code coverage, but I'm still not sure how to word it. I think my current application's code coverage is around 15% - hey, it's better than zero!

Firefox 3 - I'm liking the new features, but I've had a few javascript-heavy pages that wouldn't render, such as the uTorrent WebUI that I have running on my media center box at home.

Alanda got a new notebook (dude, guess what brand). Great machine, but riddled with problems, and, for the record, the Intel X3100 is NOT a decent video card for ANY gaming whatsoever. We're returning it, free of charge. Would buy again. Instead, Alanda's letting me build her a PC. She'll take my old video card (GeForce 8600 GTX) and I'll get a new one (probably a 9600, waiting for the price drop once the new nVidia cards are out in a couple weeks).

We're taking her old tablet PC downstairs to stream media to the TV. The downstairs (it's just a single, small room/bomb shelter from the 60's) is being converted into a workout room.

Final note, we've gone 'N'. I upgraded my router to an 802.11N Linksys. This will make a huge difference with movement of video files and music to and from our media center / file server / backup server (via Mozy).

We have to tell our kids that most people don't have a computer on their TV. They're like "Wow, really? Why not?" They have no concept. It's adorable.

In summary, I'm sad, I'm busy with home PCs, and I'll keep blogging.

(Discuss with Disqus!)

Running Vista Ultimate 64 bit

posted under category: General on May 6, 2008 by Nathan

At home, I've been using Vista Pro, 32 bit for nearly a year. I got it free from a developer promo Microsoft was pushing. I'm fairly cheap, and fairly into developing windows software, so I went for it. My XP install at that point was almost 2 years old, which is ancient for me. I was eager to wipe it and try out Vista.

A few months ago, Microsoft had another promo, and I, being cheap, traded my privacy for Vista Ultimate. My software came last Saturday.

If you don't know, when you get Vista Ultimate, it comes with both 32 bit and 64 bit discs. Since I was going to trash my Vista Pro install anyway, why not go 64.

I decided to split up my primary partition and make room for an XP install to make sure my kids' software still works, and, you know, just in case. Truth is, Vista can't be trusted.

So I installed XP, which overwrote my boot record. Now only XP will boot. I formatted my boot partition and installed Vista 64 - a good experience, but not as good as installing Ubuntu. Now only Vista will boot.

XP's recovery software is awful. Truly bad. Wait 20 minutes for the DOS-like installer to load SCSI drivers that I don't need, then give me a crippled DOS prompt. If you destroy your boot records with XP (which I did 4 times), Vista's install disc will fix it for Vista, but there's no clear way to get them to dual boot.

Eventually, with a few lucky googles, I stumbled on EasyBCD. Great software. A few trial & error reboots and now it's perfect.

The 64 bit nature thus far has been a real sleeper. Vista hasn't crashed yet, so that's good. I haven't installed enough software to notice the larger memory footprint. The only thing even noticeable is the "Program Files (x86)" folder and the special designation for x86 software in the task manager. Not bad. So far, everything has just worked. I think the real test will come when I reinstall Crysis.

As for it being Ultimate, animated desktops, a poker game and drive encryption are not worth the extra money I would have paid.

Overall, it's good. I like having the things I wanted from Home Premium along with my IIS7 that I liked from the Pro version. The price was right. No complaints.

Next, I'm going to try triple-booting by adding Ubuntu.

(Discuss with Disqus!)

CSS naked day already

posted under category: General on April 9, 2008 by Nathan

Yeah it just pops up on me every year. I can't believe it's already CSS Naked day.

I wish they would have it on the same day every year so I don't have to change my code. A week ago I moved my CSS Naked script up from the 5th to the 9th. Good thing, or I would have been a little premature.

(Discuss with Disqus!)

Software quality update

posted under category: General on March 4, 2008 by Nathan

I said a few months back that I had decided to go head first into software quality as a general scope to become proficient at, so here's an update. I'm proud to announce that I've been making good progress.

I have been using Selenium to test some of my web applications. It can get complicated, but so far it has been marginally worth it. After figuring out the system, I set up a test suite for one app and have been working on it. I will blog about this experience soon.

I looked into CFUnit and CFCUnit. These are both CFC unit testing tools. If you google it, you won't learn which is better. They both have really good pluses. I went with CFCUnit because Sean Corfield and Chris Scott said so and it was easier to get working. Unit testing, even on the handful few components I applied it to, has already paid off really well. I will be doing more of this.

I made a couple Ant scripts. It's definitely starting to pay off, so I'm not giving up. I think I just now "get" the paradigm, so things are picking up. I will blog this one soon, probably after Selenium.

I will be playing with these new tools for a long while now before declaring myself king (or whatever it is I do before I get bored and move on).

Some day, I would like to explore some sort of DBUnit testing. I am seeing at least half a dozen angles for this, but two in particular. First, to test database relational integrity and just performing crud operations on all the tables, I would need a framework to support that - this isn't unthinkable to do in CFCUnit. Second, to snapshot my data's current state for when the data changes due to any testing and I would like to be able to change it back, quickly and easily.

(Discuss with Disqus!)

The best keyboard in the world

posted under category: General on January 29, 2008 by Nathan

I call myself a real hacker, so naturally I'm at my keyboard a lot. In mid-2007 I passed a budget approval through the family finance committee and began researching keyboards. I have a few important criteria that are all important. I'm not a really picky person, I can jam on a standard dell keyboard and do alright, I can type fine on strange and annoying keyboards just fine, and with practice, on a notebook, but we all know there's getting by, and then there's getting what you really wanted.

This is my list of must-haves for selecting a new keyboard:

Must be a full sized keyboard
Must connect via USB port (for speed and compatibility)
Must not be split for ergonomics
Must not have a malformed control navigation area (home, end, insert, delete, pgup pgdwn)
Must not have a malformed arrow navigation area (I hate you, MS natural keyboard)
Must have a numeric keypad, spaced out from the rest of the keyboard
Must be wired, both because I don't want to fiddle with batteries and for responsiveness
Must have multimedia control buttons, specifically volume control
Must not be a mouse/keyboard combo
Must cost less than $100
No generic brands
Extra gadgets, buttons, sliders and such are a plus

Logitech has exactly one choice that fits my criteria, the $99 G15 Gaming Keyboard. I like games, but I don't know if I'm that hardcore. Programmable keys and the LCD screen are nice.

Microsoft also has exactly one choice that fits my criteria, the $30 Digital Media Pro Keyboard. No screen, but many other strengths, and less than 1/3 the price of the Logitech choice.



NewEgg revealed some other choices from Saitek and Belkin, but both seemed to have compressed layouts and odd designs. Amazon showed basically nothing else.

So of the two choices it looks like I have, I chose the Microsoft Digital Media Pro Keyboard. $70 extra for a keyboard screen doesn't really sound like a great deal for what I do.

I've been using my Digital Media Pro Keyboard now for a few months and have been very happy with it. I highly recommend it to anyone who is looking.

Have you fallen in love with a keyboard? Share your obsession, write a comment.

(Discuss with Disqus!)

Good Reading: Wikipedia Anti-Patterns

posted under category: General on January 16, 2008 by Nathan

Some of the anti-patterns listed on Wikipedia's page are way too familiar. It's good reading in the sense that we should learn what not to do. Here are my favorites that hit closest to home:

  • Bug magnet: A block of code so infrequently invoked/tested that it will most likely fail.
  • Anemic Domain Model: The use of domain model without any business logic which is not OOP because each object should have both attributes and behaviors
  • BaseBean: Inheriting functionality from a utility class rather than delegating to it
  • Lava flow: Retaining undesirable (redundant or low-quality) code because removing it is too expensive or has unpredictable consequences
  • Ravioli code: Systems with lots of objects that are loosely connected
  • Copy and paste programming: Copying (and modifying) existing code rather than creating generic solutions
  • Reinventing the square wheel: Creating a poor solution when a good one exists
  • Tester driven development: Software projects where new requirements are specified in bug reports
  • Crisis mode (a.k.a firefighting mode): Dealing with things only when they become a crisis, with the result that everything becomes a crisis
  • Seagull management: Flies in, makes a lot of noise, craps all over everything, then flies away.
  • Warm bodies: The worker who barely meets the minimum expectations of the job and is thusly shunted from project to project, or team to team.

(Discuss with Disqus!)

Using regex in your IDE #2

posted under category: General on December 7, 2007 by Nathan

We had some good responses to yesterday's post, Use regular expressions to be clever in your IDE, so today I'll post another example. This time, it's the exact opposite.

Yesterday, we created code that will end up like this:

querySetCell(myQuery, "first_name", "Nathan");
querySetCell(myQuery, "middle_initial", "J");
querySetCell(myQuery, "last_name", "Strutz");
querySetCell(myQuery, "phone", "480-123-4567");
querySetCell(myQuery, "country", "US");
querySetCell(myQuery, "state_province", "AZ");
querySetCell(myQuery, "city", "Phoenix");


Now, what do you do when you want to get just the column names out of that mess? For me, I would use this search pattern:
querySetCell\(\w+, "([^"]+)",.+

The regex says to find the word "querySetCell", any query name - the actual word myQuery could be put here -, a quote, then save any character that's not a quote up to the next quote, a comma, and then anything until the end of the string (in our case, the line).

With regular expressions and code, always remember to escape special characters in your code, such as parentheses, square brackets, backslashes and so on.

Replace it with this matched text:
$1
Or be creative :)

There you have it, right back to the original list we started with yesterday.


Another thing to remember is that it's the parentheses that define the backreferences ($1 because we have just one). Nothing's stopping you from capturing the content in the column value portion of the querySetCell calls. Something like this would allow you to use that as $2:
querySetCell\(\w+, "([^"]+)", "?([^"\)]+)"?.*

Then replace it with:
myStruct.$1 = "$2";

(Discuss with Disqus!)

Use regular expressions to be clever in your IDE

posted under category: General on December 6, 2007 by Nathan

Here's something I do almost daily it seems. So much so that I take it for granted. A couple months ago a friend was looking over my shoulder and he exclaimed "What the--? You've got to save that and send it to me!" I explained how it was just throw-away code, and I could send it to him if he wanted. The code is long gone but that reaction stuck in my mind, so let's dive in with an example.

You have a list of values on lines and you want to want to apply some code to each:
first_name
middle_initial
last_name
phone
country
state_province
city


Select the lines, and use your IDE's find/replace tool with the regex option. In Eclipse, this is just CTRL+F and check the checkbox. Use this as the search pattern:
^(.+)$

This regex says to select any line with at least one character in it and store it in a character group.

Some code like this would be the replace pattern:
querySetCell(myQuery, "$1", "");

Replace them all and your code will be generated in an instant. The regex will drop each line's content into the $1 backreference.

There are dozens of other types of uses just like this one.

(Discuss with Disqus!)

HTML was so easy, what have we done?

posted under category: General on December 4, 2007 by Nathan

We all remember it. HTML was easy. That's how we all got started. For a beginner, just starting out (over a decade ago for me), it was straight forward and easy to get into. Make (or take) some images, put them on a page, maybe use a table. FTP it to geocities or one of those bargain basement $50/month web hosts. Bam! 300 visitors a month, easy.

Now what have we built for ourselves?

These days, to make a good site, you're pretty much required to have advanced HTML and XHTML skills, CSS mastery including managing floats and positioning, fine tuned event-driven object-oriented javascript abilities, DOM manipulation, command over Photoshop (or whatever you prefer), firm knowledge of AJAX, XML and JSON, and also have a handful of frameworks under your utility belt.

Then your site is useless unless it can connect to a database (SQL knowledge required) and do some neat tricks (knowledge of ColdFusion, PHP, ASP.NET which is the .NET library, the ASP tag library mixed into HTML and a language like c# or VB.NET, or, Java, for which you would know JSP, JSF and/or plain Java servlets, and probably Spring and Hibernate). Use of a server-side language then requires an architect, a business analyst, requirements gathering sessions, high-level and low-level diagrams, usability studies, flowcharts, requirements docs, use cases, test cases, project managers and so on.

Of course you get more traffic now, too, so you probably need dedicated servers, clusters or server farms. Virtualize some of that to save space (and add complexity). Redundant hardware load balancing is a must, along with redundant firewalls, redundant switches, redundant servers and redundant disk arrays with redundant hard drives. And what about disaster recovery? You'll have to get a redundant datacenter in Arizona with redundant power and cooling.

Now what have we built for ourselves? Job security, higher salaries, and a big industry with lots of workers. That's what.

(entry continued after the jump)


It's been amazing to watch it grow from a garage operation in the 90's to what it is today. Amazing. Astounding even.

The first Microsoft.com web site I visited was made by one guy and it ran from a cluster of 4 servers. One day he deleted the home page. Microsoft.com, seriously. The FTP site was far more interesting than the HTTP site. Archive.org's oldest record is from October 1996, by that time they had some real features, and were toting IE 3.0. Now it's multiple data centers with thousands of servers and workers.

This whole thing is amazing, and it's all because we all got into HTML in the 90's. Good job, team. Thanks for employing me. I hope I've helped make it complex as well and helped employ some of you. Of course simplicity is always the goal, sometimes the simplest way to do something requires the most complex solution, but that's another story.

Now, the down side is that it's harder to get into. Much harder. What was simple HTML and leeching images is now a large handful of connected technologies, which you must know to contribute nearly anything more than your myspace page. Try breaking into the world of web development today and I'll ask to see your master's degree. A lot of those ho-hum web guys are ones who got into it late and didn't get those foundational elements.

That's why the smart software companies are opening up easy routes in. Microsoft's free express tools are exactly that. ColdFusion is always there and Adobe Elements is a great effort, but aimed more at those who will never make it all the way into the industry.

The web business is more complex, but it employs us, and I think software companies forget how hard it was to get us here.

(Discuss with Disqus!)

Hal and Jeff are back | Matt and Peter are back

posted under category: General on September 11, 2007 by Nathan

I've been enjoying my commute the last couple weeks, as it seems Hal Helms and Jeff Peters' podcast "Out Loud" is back in business and Matt Woodward and Peter J. Farrell's ColdFusion Weekly podcast is back from summer vacation.

For Out Loud, the August 16th episode talked about jQuery, which I have subsequently taken up and fallen in love with. The August 31st episode talked about layer separation of your view layer and finding/creating/defining beauty in coding, a couple of subjects that have always interested me. Interesting how different layers of a layered architecture can be broken up.

CF Weekly, I confess, I haven't listened yet. I will have to get to it during tomorrow's commute. Looks like a big welcome back and news party from the show notes.

It's a little difficult to sync my iPod without a video card. Not impossible, just very, very difficult. Dual core due Wednesday. :D

(Discuss with Disqus!)

The Yahoo YUI Theater

posted under category: General on September 5, 2007 by Nathan

Here's something I spotted that should be pretty interesting to all developers who like to learn by way of video. I stumbled upon the YUI Theater.

Now, before you get scared off, if you're not interested in the YUI javascript framework, the YUI Theater isn't about YUI as much as it is about javascript in general.

I'm progressing through Douglas Crockford's segmented presentation "The JavaScript Programming Language". He has an incredible amount of information that comes very quickly. I'm glad they split it up into 4 parts so I can breathe in between.

One that looks great to me is Joe Hewitt presenting on his own project, Firebug. Another is John Resig's javascript framework presentation (John Resig is the creator of jQuery).

There is a serious amount of content on the YUI Theater site, and I recommend that anyone who touches javascript try learning some more via Yahoo.

(Discuss with Disqus!)

Firefox - enable spell checking programmatically

posted under category: General on August 17, 2007 by Nathan

Just playing around with Firebug and I noticed that my form fields have a "spellcheck" field. Of course Firefox doesn't spell check plain text fields normally, so it's set to false except in text areas. The cool part is that this is just a plain attribute. Feel free to turn it on, like this:

document.getElementById("myTextInputField").spellcheck = true;

Then start typing in that text input field and Firefox will spell check it as you type.

(Discuss with Disqus!)

No, Thunderbird did not just delete all your email.

posted under category: General on June 15, 2007 by Nathan

I just had a minor freak-out because it looked like Mozilla Thunderbird (my email client of choice) just deleted a ton of email. Years worth. I was moving it to an archive folder, and when I went to check the folder, it was all gone. Just a handful of emails were left. They weren't in my inbox! They weren't in my archive folder!

I left and checked the file system. The new archive folder files were 50 MB, the old inbox was still 150 MB. Something wasn't right.

My next thought was that I didn't have a backup. This is the one place I've found Windows Vista (hey, I got it for free) to shine - Shadow Copy. It's like a constantly running backup on the same disk that reminds me a lot of Eclipse's local file version archiving. I restored my mail folder back a couple days and expected everything to be peachy. Guess what? Nothing changed.

My inbox was noticeably a couple days older, but my older mail was still gone. Ok, this is getting weird. I re-restored to my current-date inbox.

After poking around a minute in the Thunderbird interface, I found the Rebuild Index button, conveniently located on the folder's properties window (right-click on a folder, properties, Rebuild Index button). It took a few seconds and suddenly everything was back.

No, Thunderbird did not just eat all my email. It was still there, safe and sound, but boy did that give me a scare.

(Discuss with Disqus!)

I use Google Reader, and I like it.

posted under category: General on May 25, 2007 by Nathan

There was a question posted on the cf-talk list about feed readers. In an effort to make everyone exactly like me, I said I use Google Reader, and here's why I like it.

I find the shortcut keys essential, so much so that I keep trying to hit "j" when reading blogs on other sites to get to the next entry. I typically get a few hundred of entries a day, many of which I can go next, next, next right past, then star the deeper stories for later reading.

There's a "share" button on each story that kicks out a feed of its own here's mine). You can find a little widget on the left side of my blog with my latest shared items. I like the idea of sharing what I find that's cool, so there's fresh content on my blog even if I'm not writing anything.

Then there's the Google Reader tools on the iGoogle homepage - I use the Reader pod and have a few individual RSS feeds directly in their own pods. iGoogle is the first homepage I've used since yahoo circa 1996 - I had about:blank until about a year ago.

Perhaps the most fun and obscure feature of Google Reader is the Wii version. It makes reading my feeds simple and fun from the couch. This very responsive interface has naturally easy controls, which I love.

(Discuss with Disqus!)

Adobe Web Studio CS2 Review

posted under category: General on May 22, 2007 by Nathan

I thought now that CS3 is out, I should probably write up something about my experience with CS2, since Adobe was nice enough to give it to me free (thanks to User group giveaways).

Unboxing.
The box cover was large and colorful. The inside box itself had a black-on-black A for Adobe logo. I put up a couple nice shots of it on Picasa for you to see for yourself.

The installation.
Really, there were 2 parts to the installation - installing Adobe products and installing former Macromedia products. Adobe products included Photoshop, Illustrator, GoLive, Acrobat, and a couple other things I've never used nor plan on using, like Bridge, Version Cue and LiveCycle Designer. There were lots of disks, I hope this ships on one DVD next time around. The Macromedia software installation was as simple as ever, click a couple buttons and it all comes off of one disk. Macromedia software included Dreamweaver, Flash Pro, Fireworks, FlashPaper and Contribute.

Photoshop CS2.
The undisputed king of all computer graphics, Photoshop, is as good as ever, but honestly, it hasn't changed much in the last few versions. There's a lot of people who would debate its bloatedness and complexity, but for those of us who have been using it for 10 years, it couldn't be easier. So it helps to learn a couple hundred keyboard shortcuts, you're smart, you can learn them. So maybe it takes a gigabyte of memory, that's memory well spent. Anyways, all the old favorite features are in here, but I get the sense that the new features were hardly more than putting enough in just to make marketing look good. I'm just saying, it was a little light compared to changes in some of the previous upgrades. Maybe not worth of a full upgrade from CS, in my opinion. Not to say that I don't love Photoshop, and perhaps there are a few big time savers in there that will allow you to justify the cost. In fact, the layer organization features alone may be worth it, but that's your call.

Continue on to read the thrilling conclusion...


Illustrator CS2.
I haven't used a lot of Illustrator, but trying it out a couple times since I installed this version has been a very satisfying and fun experience. Illustrator is just as technical as before, but somehow it works a little better and makes more sense. I hate to say it, but this version of Illustrator makes Freehand look really bad. This is the most fun I've had in a drawing program since Auto-Illustrator. I will be using this one more.

GoLive CS2.
I've used GoLive since it was GoLive CyberStudio for the Mac, though I've never used it much. It's been a fine editor for a long time, but always lacked that pro feel of Dreamweaver. I cracked this version open a few times only to click around, get bored and close it again. I did, however, use it to open an XML file one time, and I've got to say, that was a treat. The collapsing tag view was perfect for browsing and editing XML nodes. This, however, is the only reason I think I would ever use GoLive again.

Dreamweaver 8.
I've used Dreamweaver since the original beta version, so I'm fairly comfortable with it, though I haven't ever committed to it, thanks to HomeSite/CFStudio and CFEclipse. Anyways, this release is better than ever. DW's tried and true "we don't change your code" strategy is always a winner when using the design view, and Dreamweaver remains the best tool out there for visually designing web sites. The code editor still, for no reason whatsoever, feels wrong, like it's not fast enough or instantly gratifying enough. I can't explain it. The greatest thing is the huge list of file types it supports. It gives intellisense and highlighting for almost any web-related file type. It's solid, never once crashing for me, and I believe it opens a fair amount quicker than the previous version. Dreamweaver 8 is a very nice program, and is becoming easier and easier to use, while not forcing developers to give up control.

Fireworks 8.
Again a Macromedia product I've used since it entered beta, and I'm happy to see some of the ideas from fireworks entering Photoshop CS3. Likewise, a lot of the advanced photo editing features that MM "borrowed" from Photoshop are here, but not nearly as well polished. Fireworks is a truly fun web image program that instantly gratifies. It's fun to use, but even as much, I would only use it on the types of projects I worked on, say, 7 years ago - these were tourist sites, simple 6-page brochures, etc., where I did design, graphics, HTML and programming all by myself. Sadly, I personally don't have much use for it today. Ahh when times were simpler. :)

Flash Professional 8.
The program I have used the least of all. I just don't do flash anymore. I never really loved the event/action/keyframe programming model - I know it's better now, but I'm too buried in CF to do any flash. Sadly, I have nothing really to say. I played with it for a couple minutes just to say I had, and I fire it up whenever I have a flash file to edit, but that's so rare these days. It does export to previous versions of the flash player quite well.

The Rest.
Contribute: Never used, probably never will.
Flash Paper: I keep hoping to find a reason to use it.
Bridge, Version Cue: Bloatware, in my opinion.
LiveCycle Designer: Could be cool, if I take time to learn it.

Overall, it's an amazing software package to own for any developer. Thanks to the AZCFUG and Adobe for supplying it, I really do appreciate it a lot!

(Discuss with Disqus!)

GParted - Best Utility Ever

posted under category: General on April 24, 2007 by Nathan

I bought a new hard drive last week, along with my new video card. Now I had to figure out how to get all my data off of one drive and onto the other. The only thing I could think about was good old Norton Ghost, which surprisingly is still being made, version 10.0 now, but it's $70! Then there's Partition magic - another Symantec product and another $70! No thanks, when I know that the open source community has to have something better. And, of course, they do.

Free, in every way, the GParted LiveCD is a 40MB ISO Image that you burn to a CD, which then becomes a bootable Linux OS and application all-in-one that manages all your partitions and hard drives. When you boot with the CD in, it starts the GUI and GParted application which allows you to visually manage your drives and partitions. It slices and dices, it visually resizes. I copied and pasted my 2 partitions (I always have 1 for the OS and applications, one for everything else) onto my new drive, and it worked like a charm. It was very stable, very fast, and very easy to use (if you've ever managed partitions before). Plus, it saved me potentially $140.

I'm happy to say that my HDD migration went flawlessly thanks to GParted.

(Discuss with Disqus!)

A calm in the storm...

posted under category: General on April 23, 2007 by Nathan

I had a weekend without phone calls, the first for a little while. I've been very busy, pretty much since November with a little work project. Oy! What a ride, and it's finally close to final production. But it looks like things are finally cooling down, so I'll try to start blogging again :)

Thanks for tuning in, all. I promise to not be too boring.

(Discuss with Disqus!)

Save your life in subversion

posted under category: General on February 22, 2007 by Nathan

A few years ago, I read a story on Slashdot about a guy who saved his linux home directory in CVS.

Today, John Blayter mentioned someone doing exactly that but only with their Eclipse install.

What an interesting idea, I thought. I could save my plugin configuration and my workspace folder in subversion. I can roll back when things get screwed up, and commit when I make a good change. Ahh, but what about hacking at home versus at work? How about a branch for each? Maybe work will be the main trunk and I would be able to merge changes from home while rebasing changes from work. When I install a plugin, I can make a new branch for it to see if I like it. If I do, I can roll it back into the trunk and rebase with the home branch. If not, I can drop the branch and roll back to the trunk. I can track different eclipse versions and test compatibility with my other plugins. This really could solve a number of problems.

I'm not sure I would do it. I don't currently have a place to hold my entire Eclipse setup, with versions. But the idea is something to think about, for sure.

(Discuss with Disqus!)

Phoenix CFUG, Feb 28 - Desiging the Obvious

posted under category: General on February 21, 2007 by Nathan

Just wanted to echo the word that this month's AZCFUG meeting will be Robert Hoekman, Jr. talking about his excellent book "Designing the Obvious". From what I hear, this is a great book and the subject is something everyone in our field should be aware of.

Also, you can probably guarantee we will be giving away a copy or two, and who knows what other stuff you might score just by showing up. Then there's the social interaction with making contacts in the community, which is good for your career. I'm just saying, there's like a hundred reasons to come to these things, even beyond learning the subject matter.

As usual, the meeting will be held at the UAT in Tempe, AZ at 6:30 PM. Hope to see you there!

(Discuss with Disqus!)

Interactive Sites would like to hire you

posted under category: General on February 16, 2007 by Nathan

Interactive Sites, Scottsdale, AZ.

We're hiring ColdFusion developers. New this round: varying skill levels are OK, and we have training options for promising candidates. Also, PHP/ASP etc. developers will be accepted, providing they have good experience and would like to learn different technologies. To everyone outside of the Phoenix area with stronger ColdFusion skills, consider this position and send in your resume (training may not apply if you're out-of-state). Everything I said last time still applies. Free snacks, great environment and some of the smartest people around.

We've got a lot of other smaller benefits, things that aren't technically benefits, like Alan (my co-worker who manages the CF user group - AZCFUG) shares some Adobe freebies like Flex posters and the like. Also, Alan's server in the office hosts dopefly and other employees' personal sites, so it's free. Sign up, send in your resume!

http://interactivesites.com/hire/cf2/apply.cfm

(Discuss with Disqus!)

Photo: Adobe Acrobat Connect works on Nintendo Wii

posted under category: General on January 25, 2007 by Nathan

I connected to the AZCFUG (Arizona ColdFusion User's Group) presentation last night with my Wii's browser, and I felt my geekieness factor hit the roof, so I snapped a handful of pics.


Click for a larger view and a couple thumbnails.

The one shown is a couple together because I couldn't get the lighting right.


(Discuss with Disqus!)

Need a PS3?

posted under category: General on January 16, 2007 by Nathan

I saw this stack of 60 Gb PS3 systems at BestBuy yesterday on my way to pick up a game for my Wii (WarioWare). Are these things really just not selling?


This was in the BestBuy at Raintree and Northsight in Scottsdale, AZ.

(Discuss with Disqus!)

Brushing off the dust

posted under category: General on January 9, 2007 by Nathan

Ahh what an incredibly busy holiday season. It's just now starting to wind down, and I'm starting to feel more rested, even though I've been staying up late the past few nights.

In November, I went on my first client trip, across the country to NJ, and even hit up the Big Apple for an evening. Came back and stood in line for the Wii with successful results. Then thanksgiving left us with 16 turkey eaters in our home. We spent Christmas, my 28th birthday and New Year's up in Alaska with my (numerically) huge family. Kids played in snow for the first time. All the while, my gigantic project, the reason for going to NJ, was due on Jan 4th. We made that deadline, just barely, but now have a lot left to make it right. And I'm talking huge project. Like, you may hear about it in the general public huge.

Anyways, I'm back in the saddle, for the most part. Work's still busy, but not THAT busy. I think the AZCFUG has some news in the near future about summer events, and I promise to not leave the blog so long next year. I've got a couple more cob webs to clear and some mice to kick out, so I'll see you all around.

(Discuss with Disqus!)

AZCFUG - Dates moved again - now it's November 6!

posted under category: General on November 1, 2006 by Nathan

The October AZCFUG meeting is now on Monday, November 6th. We had a booking problem with the Tempe UAT main presentation room.

The subject is still regular expressions, the presenter is still yours truly, and the CFUG is still giving away our last copy of ColdFusion MX 7 Professional (or it's monetary weight in Adobe software!). It looks like we may be be raffling tickets to drum up revenue (still waiting for that corporate sponsorship), so bring a few bucks to make sure you get into the drawing.

If you're in Arizona and want to learn (or better your knowledge of) regular expressions, this is your chance. If you like nearly free Adobe software, show up and buy a lot of raffle tickets. If you want to get ahead, make connections, etc., show up and hang out! See ya there!

(Discuss with Disqus!)

Is it time to sell out to Google?

posted under category: General on October 11, 2006 by Nathan

I don't mean for my daily searching. I mean for all of my typical work (minus programming). Exactly how wrong is it to completely sell out?

Today, Google released Google Docs, which basically googlized Writely and strengthened their link to Google Spreadsheets. I've been using both for a while, for personal, portable docs, and you can tell that things are really starting to get exciting. Without expending too much brainpower, anyone can see where they're going.

Google Docs and Google Spreadsheets are the cornerstone of their office offering. Combine that with GMail and Google Calendar, whose integration with each other is becoming completely awesome, and you've got 90% of the typical use for most office suites.

Of course, no one's office is the same as any others. Some of them offer presentation software, some drawing software, some note taking, most have basic web site tools. Open Office has a mathematical equasion tool. Microsoft has a diagaraming app and a project management app. Corel has a photo editor. KDE's KOffice has all of this, plus dedicated charting and reporting tools. Google has mapping and searching built in.

I think that Google's office is almost completely viable in this space. What's missing? What's coming next? Other than the possibility of a new tool here or there, I'd say it's obvious what's next. Packaging. Google Office Suite is coming soon. It's already so close. They only need a central launching point for their tools. I can see many opportunities for central launching points, such as the google personalized homepage, gmail, search results pages, etc. The google talk desktop app would be my personal favorite.

Very soon now we'll start seeing "Web 2.0"-style companies switching to Google as their central document repository and dealing with customers and clients through the Google Office.

Next step? The Google Hosted Office Solution! Stay tuned...

(Discuss with Disqus!)

My -cheap- HTPC project: budget is spiraling

posted under category: General on October 2, 2006 by Nathan

So I had this grand idea a few months ago, to build a home theater PC. You know, a DVR/PVR to record TV, and if it doesn't record, I can have it hit the torrents and download the episodes, have skype running as our long-distance phone, hold my 20+ GB of music and play it whenever I want, let my kids use it to play disney/pbskids/nickjr sites and other kids games, and download video podcasts. The best part was this was only going to cost a couple hundred bucks, thanks to a Fry's GQ cheap PC ($200), a simple memory upgrade ($40) and MythTV on Linux ($0).

Well, here's my story so far...


The GQ PC has an AMD "Geode" processor. Yeah, I hadn't heard of it either, but it's for low-power, low-heat applications, so it's fine. 1.4 GHz or so. I tried out the Linspire Linux OS that came standard, and let me tell you, Linspire is garbage - I installed Ubuntu (dapper). I had a simple TV card ($40) that I thought would work, and I would use that 1.4 GHz to compress TV to MPEG on-the-fly. Well, it turns out, there are no linux drivers. Ok, so I buy a Hauppague 150 card, with a remote ($90). The S-Video connector on the 150 is only video-in, so I buy a cheap nVidia card ($50) to get video out because I know it's well supported on Linux.

Now I try to install MythTV. The Debian library for Dapper only has MythTV 0.18, and MySql 5.0. Those are incompatible. I downgrade MySQL to 4.0. MythTV has other problems, I manually upgrade to MythTV 0.20 and re-upgrade MySql to 5.0.

Sigh. It works. Kind of.

I get no sound in MythTV. Also, there's a blue border on top of my TV screen. I try to ignore it. I use VLC to check the TV signal, it works great, as does the sound. I'm starting to figure out how Linux works, but I'm not sure why they chose to do it this way. MythTV is recording sound, but can't play it back. It's not muted, it's not the volume. Hey, maybe if I install the remote, I can turn the volume up (sounds nice, right?).

IVTV (the IR remote driver) is a mess, their entire model is crap. I'm sure they put a lot of work into it, but it just doesn't work. I can't use the latest version of the remote driver because Dapper's kernel is a couple micro-versions back.

Originally, I thought MythTV would do a lot more. Turns out, it doesn't do hardly anything. It connects a few disparate systems and drivers, and ultimately is just calling other applications via the command line. I'm having less faith in it.

So now I can watch TV without sound, or record it and watch it later in VLC with sound. My remote doesn't work, and there's still a blue border around the top of the screen.

I figured this was a good time to give up. I've got all the parts, and certainly enough horsepower to run Windows, so I install Windows Media Center Edition ($no comment). It's great. It works. I install the drivers and I'm watching TV in minutes. It sucks that Windows works so much better.

But, now, the remote doesn't work. It controls the tv card's native software, which is pretty lame compared to the Win MCE TV software. Now the remote will let me rewind & pause TV, etc, but not change channels and control MCE, and after a couple minutes of working, it quits, every time. Why doesn't it work? Apparently MCE can only use MCE remotes. Period. Sigh.

MCE remotes are another $40+, so I talked Alanda (my wife) into getting a lower-end Logitech Harmony remote ($90). It's on its way as I write this, so I hope it will eliminate at least some of my 7 remote controls. Otherwise, Windows Media Center is chugging away, recording all the important shows (like Lost and JoJo's Circus).

I have some high hopes for it still. I couldn't get the new remote interface to uTorrent working, but I'll keep up on that as they release new beta versions. I'm thinking of getting Democracy running to manage video podcasts, but I'm not convinced that ther are any worth watching on TV. I also need to buy a skype phone handset ($50?) so it feels like a telephone. I think that will make it a lot easier to use. Then I need a bigger HDD ($100). And a DVD drive ($30). And... (forever).

Grand total so far? Over $500 and climbing.At least it's been gradual, and it's a fun hobby, and a real learning experience. That's what I keep telling my wife.

(Discuss with Disqus!)

I told you I would do it...

posted under category: General on October 1, 2006 by Nathan

Thanks to Bryan and Michael of the ColdFusion Podcast and their 2 minute dissertation on the ownership of this blog (which was really funny), I have redesigned Dopefly to include my name in much more obvious places, and increased the font and layout sizes enough for it to be visible from space.

That wasn't the only reason. I was looking for a way to get more horizontal space in here as well, and was getting bored of the old dusty feel. I think I still have some problems. Alanda's tablet makes the background look "puke pink," and there's a display problem with IE (isn't there always) on the top nav.

Overall, I would call this a great success for CSS and included display (header & footer) files. This whole change wasn't more than a handful of hours.

Please comment if anyone has other display issues with the site. Complaints about it being too wide are valid, as are color scheme gripes and so on. Thanks all.

(Discuss with Disqus!)

Interactive Sites is hiring!

posted under category: General on September 15, 2006 by Nathan

Interactive Sites, my employer, is hiring ColdFusion developers. We have at least a couple positions open, possibly more. We have a lot of exciting new projects coming up and are quickly finding ourselves in need of more CF programmers. If you live in the Phoenix area, or anywhere in the US, and want to check out what we have to offer, drop your resume into the form here:

http://www.interactivesites.com/hire/cf

As a quick summary of what it's like working here over the past year, I can say what's cool. Snacks and beverages are provided (anything you want), it's a very casual environment and you can wear what you like. We typically have music playing in the main area, monthly birthday parties, Christmas decoration competitions. The engineering dept goes to lunch together most days (for those that want to eat out, so it's not everybody most of the time), and that really builds friendships and teamwork. We have intellectual conversations about practically anything, my favorites are subjects like the USB RAID array, making millions of dollars with simple web apps, finding new ways to automate everything and replacing our former employees with shell scripts.

If you like the programming scene, love playing with CF, making web sites, and coming up with new ways to solve new problems, send us your resume!

If you write CF in a dull environment and are bored or underpaid, you owe it to yourself to see what it's like here.

If you live in Alaska (like I did), or anywhere cold, wet or humid, you should really think about this opening.

PS, Here's the official opening.

(Discuss with Disqus!)

It's at the bottom...

posted under category: General on August 29, 2006 by Nathan

A comment on this week's ColdFusion Weekly vaguely mentions my blog's lack of an about pod. Well, Matt, Peter, my about pod is at the bottom of this blog's main page. Also, on the bottom right, just below the sand dune, or whatever that is, is my name.

Actually, I was just happy to hear my project mentioned. Thanks guys, I love the show.

Incidentally, I got a mention of my Reactor reverse-engineering disaster scenario project on The Coldfusion Podcast. It's just cool to be known, sort of like cheers. They didn't use my name either, though, so I'm starting to get the hint.

Now you've got me planning on a design update for Dopefly. Stay tuned, folks.

PS, Strutz is pronounced like "struts." ;o)

(Discuss with Disqus!)

Flash Cookies (literally)

posted under category: General on August 24, 2006 by Nathan

Happy birthday, Flash. 10 years already. Here's a picture I snapped from my Nokia before I scarfed this little puppy down.

Flash Cookie
Speaking of little puppies, our little beagle puppy, Zorro, is back living with us after a few years off. It feels sort of like the cosby show.

(Discuss with Disqus!)

Installing Ubuntu is very, very fun

posted under category: General on July 11, 2006 by Nathan

So I installed Ubuntu last night onto my newish $150 PC. The plan is to make the cheapest DVR possible. I've been planning this for a while and haven't been motivated until just recently.

Anyways, the Ubuntu installation process. First off, if you put the CD in on Windows, it will tell you about Ubuntu and allow you to install some of the Windows open source software it carries on the disk - things like Firefox and OpenOffice. That's nice.

Once you boot from the CD, it loads Linux, just like a Linux live CD. It gives you the full Gnome shell, applications and games you can run and so on, with an icon on the desktop labeled "Install." Double click and it starts the easiest install process I have ever witnessed, plus all the while, you can play solitaire or surf the web while the installation finishes up in the background.

If you follow down my path, check out Automatix to get you a good head-start on the software you need.

Now as soon as I figure out my video drivers and install MythTV, I'll be set.

(Discuss with Disqus!)

Eclipse Callisto out now!

posted under category: General on June 30, 2006 by Nathan

For those of you who use Eclipse (which should be everyone by now, for one reason or another), The Eclipse Callisto project is out!

Callisto is the simultaneous release of 10 major Eclipse projects, including the Eclipse Platform 3.2 (required for the latest beta of CFEclipse) and Java Development Tools, The Eclipse Web Tools Platform (HTML, Javascript, CSS, XML and more), the Data Tools Platform (making Eclipse a strong database developer tool) and a whole lot more.

Download it now at the Eclipse Callisto Page.

p.s., Digg my story, then add me as a friend :)

(Discuss with Disqus!)

Searching for javascript frameworks, day 2

posted under category: General on May 11, 2006 by Nathan

I've had a lot of good responses from yesterday's question about Javascript frameworks, and the search continues. Here's what I'm still considering:

Prototype is popular, more than I thought, especally with Scriptaculous. Sounds like a winning combo, but it can be a big download.

The new Adobe Spry seems quite cool, very promising, and, since I'm still choosing, would be an awesome thing to get into at the ground floor (it was released yesterday). One negative is that Spry is an "AJAX Framework," not necessarily javascript and not big on effects, but those Flex-style layouts are just great.

MooFX got big props, from the few people who use it. It requires their "prototype lite", which sounds like a cool deal and a smaller download. Looking at the samples, the syntax doesn't seem as obvious as Scriptaculous.

(Discuss with Disqus!)

Choosing a javascript framework

posted under category: General on May 10, 2006 by Nathan

I've been thinking about choosing a javascript framework for a few weeks now, and, having no experience using any, so I was hoping for suggestions.

Frameworks on my radar are Prototype, Dojo, Scriptaculous, MochiKit, and I've briefly hit up the frameworks page on the Ajax Patterns wiki, but have become pretty completely overwhelmed.

Does anyone actually use OSS JS Frameworks? For all of my projects, so far, I have always built my own from scratch, but I'd love to build on the work that a lot of others have already put in.

(Discuss with Disqus!)

How the CF community should engineer a scaffolding replacement

posted under category: General on March 17, 2006 by Nathan

This is me scratching down some notes for my theoretical scaffolding project, a mechanism that takes a database model and turns it into a set of forms and records pages.

[Pre-Generate]
We need to pre-generate forms give the flexibility to modify. Forms dynamically created on request would not be so easily customizable.

[Oh CRUD]
Do we marry the scaffolding framework to an ORM such as Reactor, or do we have it create the necessary DAOs itself? In the effort of not duplicating any work that has already been done, and to not render any pre-installed data access layer useless. Our project should have tie-ins to the various ORM frameworks and require that one exists. It should, however be possible to extend the framework to use any custom data model layers, and to force it to manually map to a cfc/function. To summarize - this tool is not a SQL generator - there are plenty of those elsewhere.

[Reading Fields]
Where does the data come from? If we are going to force the use of an ORM like Reactor or ARF, we may be able to read metadata out of those objects. It would be safer than reading it out of the database, in case the ORM uses aliases to certain tables. Creating autowiring to all of the major ORMs has a huge possible headache factor.

[Templating]
The product should ship with a few templates, Flash forms, plain CFForms, plain HTML forms, etc, a few of each. Each template should probably contain named field templates. The idea here is the rendered template is as close to a form that you actually want to use as possible. The less modifying on the end-result, the better.

Furthermore, the item list page should have a few templates to choose from to complete the round-trip process. Again, we should include a few with the framework.

More after the jump...


[Validation]
We need to make a way to include the most popular form validation techniques, be it qForms, cfform default validation, custom server-side validation, validation based on the ORM, or any combination of the above. The template page will control where validation messages appear (if inline).

[Table Metadata]
We all have (or should have) metadata on most of our tables - who created this and when, is it deleted, etc. You don't want that info printed out on the form, and you shouldn't have to delete it from the generated code every time you make a form. This would be a fairly simple system of checking which fields shouldnt' show up.

[Administration]
An attractive, easy-on-the-eyes administrator to manage everything on a global level, manage the generation of 'scaffolds', manage a scaffold on an individual level, and manage each and every form field, including displaying, default values, linking selects, form field types, etc. Yes, this is very granular. You will have to drill down a ways to find these details, but if we don't put it in, nobody will be happy.

[Client Ready]
Imagine if we had a client-ready, somewhat dumbed-down interface. Your CMS users could make their own forms based on a generic table. This may be a side-project, but a useful one, nonetheless.

[Re-Generate]
Re-generating a scaffold shouldn't overrwrite everything if any changes have been made to it. We should consider partial regeneration where possible.

[Rediculously Easy]
It needs be easy to set up and create the first few forms. Easy as dropping the files in a folder and hitting it in your browser. Perhaps a quick setup page and a tour mode that turns on helpful tips for your first few times through. We have to tout the real WOW factor.

[Recognize Changes]
Something I know Reactor does, if a table changes, it modifies all the CFCs it has created for said table. New fields should be added instantly to forms.

[Special Data Rules]
Everybody's database has special rules. For instance, deleting a record sometimes means changing a deleted bit flag. This change has to be reflected on the item list. Changes of this sort should be considered and many will likely be adapted as an administrative option.

[Framework integration]
Many developers using this product need framework support. As such, framework code needs to be generated and inserted into the correct and logical place. Of course, options would exist to prevent tampering with your configuration files. In these cases, developers should be presented with framework-specific code that they can insert into their files manually.

[Framework reliance]
To Be Determined. The administration tools should be built to harness a framework, and use of frameworks should be implicitly preferred wherever we go. I have no preferences, personally. I may like to stick it in model-glue just for giggles (thanks Ray Camden).

I have a feeling I'm biting off more than anyone can chew. This stuff is totally open for public ridicule/flames/corrections/additions/praises. Leave comments!

(Discuss with Disqus!)

So happy with stuff I find on Sourceforge.net

posted under category: General on March 6, 2006 by Nathan

Anytime I need some kind of utility, I know can find it at sourceforge.net. I know I can't be the only one with this experience, but you've got to agree, there's just no equal. And the level of quality on some of the projects hosted there is just astounding.

Today I needed an FTP to local file synching tool. I could build it myself over the next 4 hours, or use someone elses (that probably will work better), so I found a few, all under $40, but I'm cheap. Then it hit me, duh, sourceforge. So, one quick search nets me FullSync, a very simple app that does one thing, and does it good. Works like a charm.

Of course it's not the first time. How could I forget the day I stumbled upon CDEX, FileZilla, Azureusor WinMerge? I bet I've got 50 of these stories.

The open source community in general are some of the nicest folks I know of in the whole world. Thanks open-sourcers. You're the best!

(Discuss with Disqus!)

1st Page 2006 released. Pigs sprouting wings.

posted under category: General on January 20, 2006 by Nathan

6 years and no releases, and finally Eversoft releases 1st Page 2006. It's the same, free HTML editor it's always been, just newer with a lot of cool stuff.

Take a look at the features list on this one. Specifically the CSS and cross-browser help it gives you. Yep, it looks mighty familiar. Ladies and gentlemen, it's nearly a free version of Dreamweaver. It's got scripting support for all our favorite languages, and looks like even some tools lost in transition from HomeSIte.

Of course I'm not switching from my much loved Eclipse, but I do plan on giving this a shot, I could use a free HomeSite/CF Studio replacement in my tool library, couldn't you?

(Discuss with Disqus!)

10 reasons why I don't blog more

posted under category: General on January 20, 2006 by Nathan

10. Getting tired of my blog admin - I made the app myself, and cheaped out on administrative features, now I don't really want to use it
9. Long list of important things, and blogging is about #18
8. Holidays and family keeping me busy
7. Already blogged almost everything for Fusebox and CFEclipse I could think of
6. The only thing I want to blog about is a certain company who fired my wife for Christmas, but they appear to not like their name out in the open and have angry lawyers
5. Busy at work, JB is killing me - I enjoy it and all, but I'm busy
4. It's more fun writing my new blog software than using the old
3. It's more fun writing software than blogging, and I've been playing in c# (if you hadn't noticed)
2. 2 hours of commuting every day, taking time away from the wife & kids - awake time goes to mostly to them
1. Call of Duty 2 (pc version)

(Discuss with Disqus!)

Free internet! (or, fun with wardriving)

posted under category: General on December 5, 2005 by Nathan

It seems our local cable technician can't jot down a MAC address correctly, so we were net-less over the weekend at our new place. The bad thing about that is my wife had some howework due at 5 am on Monday (that's today).

This is when we learned about Alanda's tablet's great wardriving features, including toshiba's radar app where networks come on and off, moving toward the center, closer for higher strength signals. Drag a line from a network to the center and you connect.

We had a lot of fun, and were amazed by how many houses and businesses have wireless networks, and how many of them are unsecured and open. We sure do appreciate the help, residents of Chandler. You're tops in our book ;o)

I'm thinking of taking the password off of my router.

(Discuss with Disqus!)

New iPod Owner

posted under category: General on December 1, 2005 by Nathan

I just had to mention how pumped I am about my new video iPod. This thing really is cool! Alanda got it for me for our 5th anniversary last weekend (I got her a new wedding ring - it's sort of a long story). Anyways, the iPod really is everything I was hoping for, and with the video features, podcasts, video podcasts, and 30 gigs of space, I can't imagine ever getting bored with it. The tiny screen is completely incredible.

Transferring movies to it is as easy as processing them through Videora Converter and adding them to my iTunes library. I'm still trying to get used to iTunes, vs my old standby (since '97) WinAmp.

Now i'm busy looking for cool accessories that fit the 5th gen iPod. They're a little rare, but I'm patient.

PS, my wife is the best :)

(Discuss with Disqus!)

Stupid web tricks out of boredom

posted under category: General on June 11, 2005 by Nathan

Visit dopefly.com at night and you'll get a different skin than the normal daytime look & feel. It's just a tiny bit of date/time math and switching a stylesheet out, but it's cool, and a nice project for a Friday.

(Discuss with Disqus!)

Musical Baton Meme

posted under category: General on May 26, 2005 by Nathan

And coming in days late, it's time to put up or shut up, all thanks to Sean Tierney, who reminded me to post this last night at the cfug meeting. So...

Total Volume (of my MP3 library): 18.2 GB

Last CD Bought: "Phenomenon" - Thousand Foot Krutch

Song Playing Right Now: "I Sigh" - Sackcloth Fashion

Five Songs I Listen to a Lot:
* POD - Asthma
* Andy Hunter - Go
* Blindside - Pitiful
* Chevelle - Vitamin R
* MeWithoutYou - Four Word Letter (Pt. Two)

Five People to Whom I'm Passing the Baton:
And curse the rest of you? No, I'll be kind. Not to say there aren't a lot of people who should fill this out, like, oh, say, Rob Rohan, or maybe John Blayter, who's blog appears to be offline due to server problems, or how about Sarge, Andy Jarrett, or Mark Mandel. But I wouldn't want to put other people through this. No not me.

(Discuss with Disqus!)

Programmers, Prepare Your Pranks!

posted under category: General on March 30, 2005 by Nathan

As a friendly reminder that April Fool's Day is just around the corner, and better yet, it's a weekday, for those of you who run any intranets, here's a little code to get you going. Just a simple little trick, but it gets the job done. Click below to view it (just a little CF, mostly Javascript).


<cfif not dateCompare(now(),"4/1/#year(now())#","d")>
<script>
var r = Math.round(Math.random()*100);
function dang() {if(r==25){document.bgColor=getRandColor();setTimeout("dang();",50);}}
function getRandHex() {var b16=new Array(1,2,3,4,5,6,7,8,9,'a','b','c','d','e','f');return b16[Math.floor(Math.random()*15)];}
function getRandColor() {var c="";while(c.length<6){c+=getRandHex();}return c;}
document.onload=dang();
</script>
</cfif>

Try it out. Doesn't do anything? There's a 1% chance that it will, but once or so out of a hundred hits, you'll get a random color flashing page background. Refresh and it's gone! Pretty sneaky, no?

(Discuss with Disqus!)

Macromedia Pens

posted under category: General on March 24, 2005 by Nathan

Went to the AZCFUG meeting last night. There was hardly anyone there (I think it was due to short notice), but there was a nice spread of junk/schwag/stuff/gear to give away. I scored two of those amazing macromedia pens, a gel pen and one with its own sleeve. I've gotta ask, is there anything better in the world?

Everybody out there should hit up your local usergroups. You can really score some decent stuff. Last year I won a copy of CFMX Professional. I've won 2 books and 4 pens this year. If you're not involved, you should try it out.

(Discuss with Disqus!)

Thunderbird hits 1.0

posted under category: General on December 7, 2004 by Nathan

I've been running Thunderbird since the 0.6 release, and it's been incredibly stable, an honest step upwards from outlook express and outlook 2000 that I had been using, plus it's free. Earlier today (well, yesterday, it's after midnight now), Mozilla released Thunderbird 1.0.

If you use Outlook Express, the free email program that comes with Windows, you shoud seriously consider upgrading. Thunderbird will migrate your mail and other settings so there is nothing to set up. It's easier to use. Easier to customize. It has built-in spam control -- it learns what spam is to you and can automatically delete it for you. There are already dozens of extensions and themes for Thunderbird, including many good time-savers.

If you use a more complex mail program such as Outlook, but don't find any use in the extra "bloat" features such as the calendar, tasks and sticky-notes, give Thunderbird a test drive for a few days. It's a lot faster and smarter overall. It's also more secure than Outlook.

If you're already using it, upgrade to the 1.0 final version. If you're not, look into it and try it out. "Reclaim Your Inbox!"

(Discuss with Disqus!)

Professional tip #1

posted under category: General on November 1, 2004 by Nathan

Here's a professional tip:
Have a family.

Having a family reduces stress on your life (assuming your family life isn't stressful). Lower stress equals general happiness and contentment with life, which is important for feeling successful professionally.

Having a family, especially with kids, increases your income. At the very least, you get the dependant tax-break, but moreso, people with families generally make more money. Why? It's probably a balance of parents who know they have to work harder to create stability, and businesses who feel some warmth to people who rely on them to take care of others. I'm sure there's more there, if you were to dig deeper.

I'm no pro, really. I just saw it on 60 minutes a few months back and wanted to comment.

Anyway, my family (including week-old Jude) couldn't be happier.

(Discuss with Disqus!)

Thunderbird users: Compact This Folder!

posted under category: General on September 28, 2004 by Nathan

If you're using Mozilla Thunderbird to manage your email, this is important. Right-click on your folders, one at a time, and select "Compact This Folder." Don't worry, it's safe. It seems to flush out messages that were deleted, but still take up space in the mailbox

My mail folder was over 100MB for one account, and after compacting my mail folders, it ended up just over 40MB. Certainly worthwhile to remember to do every once in a while.

(Discuss with Disqus!)

Gmail invites for ideas

posted under category: General on August 31, 2004 by Nathan

Give me a suggestion on how to improve this site, and I'll send you a GMail invite. It's as simple as that. I've got 6 to send right now, and my site sorta sucks :o) Leave your ideas and your address in the comments below!

(Discuss with Disqus!)

Hotmail Junk Filter

posted under category: General on August 17, 2004 by Nathan

Now that I've got 250MB in my ancient Hotmail account, I can actually have the junk filter send messages to my junk mail folder, instead of straight to the trash. That's good, but I wish I could've done it sooner. Looks like Hotmail was filtering out ALL KINDS of mail. 5 out of the 24 it deemed junk were actually good, valid emails. Things like password requests and newsletters I'd signed up for, and had, at one point, been receiving regularly. Even the CFDJ newsletter I didn't know I was supposed to receive every month.

It's amazing the kinds of things you find just by looking harder.

(Discuss with Disqus!)

Hotmail - 1% of 250MB

posted under category: General on August 16, 2004 by Nathan

Looks like hotmail is sneaking in their 250 MB upgrade this weekend. What a relief. I've had a hotmail address for ages, and I've lost more than a few emails due to the old 'Your Inbox is reaching critical size' problem.

It's about time Hotmail catches up to the rest of the internet standard. Yahoo already upgraded to 100MB, and of course GMail with 1GB.

(Discuss with Disqus!)

The DopeFly Tech Blog

posted under category: General on August 12, 2004 by Nathan

So, welcome to my techie blog, thanks for reading it. Very kind of you. This isn't my first ever web log, in fact I've had plenty of the more manual versions in the past, since 97 or so. This one is by far the coolest (I think say that every time).

I made it myself, so there's a few things left to do to make it as cool as a real live blog, like searching by categories, dates, showing a little calendar of posts, maybe links to other blogs, all nice things that blogs tend to do, although I'm just guessing, since I've never even seen a real being administrated.

The more I work on this thing, the more I realize I should've just used raymond camden's blogCFC. But the experience was fun.

I've got some content brewing in the back of my head (and in my palm pilot), so this should be fun.Stay tuned.

(Discuss with Disqus!)
Nathan is a software developer at The Boeing Company in Charleston, SC. He is essentially a big programming nerd. Really, you could say that makes him a nerd among nerds. Aside from making software for the web, he plays with tech toys and likes to think about programming's big picture while speaking at conferences and generally impressing people with massive nerdiness and straight-faced sarcastic humor. Nathan got his programming start writing batch files in DOS. It should go without saying, but these thought and opinions have nothing to do with Boeing in any way.
This blog is also available as an RSS 2.0 feed. Click your heels together and click here to contact Nathan.