Web Dev

  

Concerning the development and maintenance of web sites. There’s a lot to that stuff, you know!

“Honing the blade,” or self-improvement by the company you keep

As my daughter Emma gets older and begins to form her personality, I think about the concept of improving oneself by the company you keep. It's one of life's not-so-obvious facts: one of the best ways to improve yourself is to be surrounded by those who are better than you. Obviously, that's a simplification; taken at face value it can even sound a bit negative by implying you're not as good as everyone else. But perhaps a few personal and professional examples will clarify my point.

Read More

Using jQuery and ajax to input nodes into a neo4j REST server

Using jQuery and ajax to input nodes into a neo4j REST server

Okay, let's get one thing straight: if you're reading this post you probably found it by Googling for terms like "jquery," "neo4j", and "ajax". I assume that because when I was dealing with this topic I searched for those same terms and couldn't find much that helped me. Neo4j's REST server documentation is great if you're using cURL to input and manage nodes. I'm not sure about you, but I don't write a lot of web-apps from a command line; I write them in javascript and jQuery! I wanted to set up AJAX calls in my web-app that would perform CRUD operations on nodes: CReate, Update, and Delete. After a lot of playing around with jQuery's $.ajax() method I succeeded and wanted to share the code to help others looking to do the same thing.

Read More

Javascript snippet to convert to military time

Javascript snippet to convert to military time

Military time is sort of a misnomer: there are plenty of uses for the 24-hour clock. Specifically, storing and passing time values in a web application. Sure, there are specific data types for time values in javascript but sometimes all you want is to store a user-selected time value in a compact form. Military time is great for taking something like 3:20 p.m. and representing it as just 1520. And hey: if you're reading this post, chances are you already know why you need to store time in this format and don't need further talk, you want the code! This post provides a javascript function and accompanying HTML markup to do exactly that.

Read More

Smarter sorting of values from an SQL database

Smarter sorting of values from an SQL database

Sometimes you get stuck on a project where you inherit a database that isn't set up the way you'd like it. In such cases you may find yourself wishing to select or sort data by a portion of what's in a column, not the column's entire value. Most varieties of SQL allow you to do this with string-manipulation functions like mid(), left() and right(). Apply these functions to column names before they're passed to WHERE and ORDER BY statements and you can accomplish what's necessary even if the database isn't structured perfectly.

Read More

Improve page load times by compressing code; or, "mnfy ur JS"

Improve page load times by compressing code; or, "mnfy ur JS"

Web applications are growing more popular every day. That's great for user experience, but they usually require a sizable initial download of javascript that can increase the time users have to sit and wait for the app to start. One way to combat this annoyance (as well as "protect" your code from casual viewers) is to minify it. Javascript minification is a very easy and beneficial process that all developers should be using, whether coding sophisticated enterprise apps like Gmail or just a regular site with a decent amount of UX gloss.

Read More

How not to sell $10,000 support contracts

How not to sell $10,000 support contracts

We've all bought things online: books, sweaters, music, electronics, whatever. Not a big deal, even for a high-end item like a TV or a computer. But some things simply don't make sense to buy online. Expensive, enterprise-level service contracts are one such item, yet RhoMobile does exactly that. So what's wrong with that? Besides just being sorta strange, it shows a lack of understanding of the customer they're trying to reach.

Read More