As a software developer, there are languages that I use all the time (like HTML, JS, CSS, C# and SQL) and those things that I don’t use too often (like regular expressions). So, it’s good to have little cheat sheets – things to remind you of syntax from the last time you used it.

Whether your occassional thing is regular expressions, HTML colours or the kings and queens of England, there’s probably going to be one on the addedbytes.com website that will fit your needs.

 

 

One of the common things that developers have to do is to edit XML. There’s a lot of very good paid for tools out there that give you everything you need to edit, view and visualise XML, but one free option is to use Notepad++ with the XML Tools plugin.

To get the plugin, go to Plugins -> Plugin Manager -> Show Plugin Manager. This will bring up the Plugin Manager. Tick the “XML Tools” plugin and click the “Install” button.

If you’re running with User Account Control, you’ll also have to run Notepad++ as administrator the first time you want to use the plugin. I think it’s modifying a config file and so needs to do this. On subsequent occassions, it’s fine.

I’ve written a piece of software that can be used to analyse what people are saying about a particular word on Twitter, and this gives two lists of information: the links used in tweets about a word, and other words used in tweets.

I’ve built it as software for now, because I’m not sure it would work on the web as Twitter throttle traffic. It’s Windows only, and you can download it from TwitterAnalyserSetup. Each request takes time as it has to follow redirects to resolve links.

If you use it and like it then please leave a comment or contact me on Twitter.

The terms “programming” and “software engineering” are often seen as similar, but they are different things. One if about writing code, the other is more about a complete system and its maintenance and lifecycle.

To try to illustrate, consider a bridge over a motorway. You have to measure it up, precast some concrete, get the concrete to the site, and then fix it in place. You now have a bridge over a motorway. Right now, it’s a good bridge and if it were for something temporary, it would probably work just fine.

But as a bridge to be used every day for years, we have to consider running the bridge. This is where the parallels of software engineering come in:-

  1. Stress loading. In the same way that we would want to test for those big days when everyone goes away for Christmas, or when a whole load of artics goes over the bridge, so we want to do the same thing with software.
  2. Monitoring. We don’t want to wait until the bridge completely breaks and falls on cars before doing something about it. If the bridge has a fault we need to know about it, and that means continuous monitoring. Same with software. If customers are getting a slow response, we need to know about it before it becomes painfully slow and they go elsewhere.
  3. Maintenance. We need to consider what maintenance we might want to do to both a bridge, or some software, and to consider this in the design of both. If we use a method of construction for a bridge that very few people can fix, it’s potentially going to cost a lot more, or create problems than if we use something that has a reasonable pool of people.
  4. Exception management. We don’t want a website to crash when it gets unforseen errors, any more than we want the motorway to close if someone drives off a bridge. When one user has a problem, we want to isolate the problem and keep everyone else moving. In the case of bridges, that means putting up safety barriers. In the case of software that means sanitising user inputs.

In summary, it’s about looking at the software produced as a complete service, whether that’s a phone app, website or desktop application.

Some years ago I had a head injury which came from some botched dental work, and one of the things that’s helped me is the cranial oesteopathy provided by Kim Burnett who works out of clinics in Ramsbury, Aldbourne and Newbury. Kim is very professional and for anyone in the Swindon, Wiltshire or East Berkshire area, I can really recommend her.

I noticed a few days ago that there was a campaign called Occupy Flash which wants to rid the world of the Flash Player. The response was a somewhat sarcastic Occupy HTML campaign, which aimed to stop HTML purism.

I tend to agree with the Occupy HTML campaign. Flash was, for a while, a very important technology because of what it could give in terms of the user experience of a site. Most of this is now better done in HTML, Javascript and CSS. But there’s still places on the web where Flash is handy. There’s a number of Flash gaming sites, and HTML/Javascript hasn’t replaced these. Flash can give users a better experience with file uploads. It also allows things like voice recording via a website. It allows videos to be shown with Digital Rights Management support.

Of course, if you’re using Flash, you need to consider some graceful degradation for those users without it. If a user doesn’t have Flash then you’ll have to give them a regular file upload.

Like all things, it’s about what works for your customers, their users and ongoing support.

I see from Matt Baxter-Reynolds that node.js has been released for Microsoft’s IIS. I’ve had an occassional glance at node.js as I liked the thinking behind it, but I’m going to take a more serious look.

Microsoft are a very good software tool development company, but they don’t pick up on things until they’re reasonably sure that they’re going to be around for a while. They’re a few steps behind the open source/Linux world, only picking up things like MVC and jQuery once it appeared that they weren’t going way. So, their backing of node.js is an important sign that it’s not some flash-in-the-pan, but here to stay.

Node.js seems to be very much pitched as a performance gain, but for me, I like the idea of being able to write code in the same language for 2 purposes. If I’ve written a function for the client side, then why not also use it on the server side without rewriting it? Right now, I have to deal with 3 programming languages: Javascript, C# and SQL. I’d much rather have 1 or 2 less, to make my programming more portable.

I’d really like to find some numbers on how much programmers cost compared to CPU cycles over time. If a programmer is scouring for answers to a problem rather than getting an answer on StackOverflow within a few minutes, how much does that cost a business? That’s not to say that sometimes performance isn’t worth spending money on. If you’re running Google or eBay, then using tools for better performance at the cost of programmer time is probably really worth it, but for most people having reliable and fast tools for development is a much bigger thing than the performance of the software.

I’m currently developing a tool that will allow users to analyse how keywords are being used in Twitter. It works out what links people are referring to and associated words for your company. This might help you to analyse trends for clients, or to be alerted to possible corporate strategy problems.

We’d love it to be a web app, but because of the limitations of Twitter and the time it takes to process, it has to be installed software for your PC. And Windows only.

If you’re interested then leave me a comment or reply to me on Twitter (@timalmond).

I was recently doing some work for one of my clients and took a look at the existing Google Sitemap. The client’s site has 1 page for each row in a database table. Each should be found because of links from categories, but we couldn’t be 100%, so best to put them in the site map.

Rather than just regenerating the sitemap, I decided that it would be better if the website would regenerate it for me. Also, I wanted to keep the various static pages (for categories) on the site outside of my database-generating code to keep content outside of code. This keeps everything cleaner.

The solution to this was to be found in the Sitemap Index File. Using an index file I could two sitemaps. One would be for the dynamic pages, one for the static pages. The sitemap looks something like this:-

This file replaced the existing website file:

<?xml version="1.0" encoding="UTF-8"?>
   <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
   <sitemap>
      <loc>http://www.example.com/sitemap1.aspx</loc>
   </sitemap>
   <sitemap>
      <loc>http://www.example.com/sitemap2.xml</loc>
   </sitemap>
   </sitemapindex>

The file sitemap2.xml is just a file, sat on the server, which contains all the pages like home, FAQ, category pages from the original file. sitemap1.aspx isn’t a file, but an asp.net page. When Google’s spider comes visiting and asks for the sitemap, it asks for sitemap1.aspx and a program runs on the server that retrieves data from the database and then serializes it as XML formatted for sitemap that gets passed back. The data is therefore right up-to-date.

Whilst I implemented this in asp.net, there’s no reason the same approach can’t be taken with any other web language. And if your database has information like when a record was last updated, you could also provide this, and this would help out Google’s spiders in querying the data.

And how did it go? Well, we’re already seeing some traffic increase, around 10-12%.