11.07.09

Learning Objective-C

Posted in Programming, Uncategorized at 2:38 pm by Toby

Like many many people who have decided to jump (maybe a bit too late) onto the IPhone development bandwagon, I have had to do two things I never thought I would do!

  1. Buy a Mac (a lovely little mac-mini)
  2. Learn how to write code in Objective-C (the bastard unwanted love-child of C, C++ and Small-talk)

Its been great fun, and I’ve learnt a few things on the way.  While I have a long way to go, I’ve already run foul of Apples policy of silence – buying my mac-mini 3 weeks before they released a new beefier version with double the memory of the one I purchased.

I eventually purchased an IPhone about 5 months ago after starting off with a loathing of them when they were initially released and slowly gaining a gruding respect for them as more and more of my friends turned up in the pub with them, before it turning into a burning ‘I MUST HAVE ONE’.  This got so bad that I bought myself out of the last 9 months of my 3 contract to change to O2 so I could get an Iphone.

Saffron Pears

I havent been disappointed.  I like many others find that the IPhone is what I have been looking for for the last 3 or 4 years since phones began to get ‘smart’ but not quite smart enough.

[NSString init]

I then moved on as a developer to needing to write apps for it.  I swallowed my pride and after several false starts where I went into the apple store stared for a while and walked out, I finally one day came out with a Mac-mini under my arm.  After two solid days of downloading (upgrade os, critical updates, xcode, sdk) I finally sat down to see what I could do.  That is when I came face to face with Objective-C.  I spend most of my programming career writing Delphi code and never managed to learn either C or C++ infact the only { language I have any knowledge of is php but I think thats where the similarity ends.

I took a look at the rather interesting Stanford IPhone course which is available for download via ITunes University, but after a couple of failed attempts at connecting things in Interface Builder I abandoned ship went Old-fashioned and bought a book on Amazon:  Beginning iPhone 3 Development: Exploring the iPhone SDK This book has been well worth it and I am slowing working my way through it.  Objective-C is slowly begining to make sense.  I am begining to understand it in terms of other languages which makes it a bit easier.  I will write here as I work my way along.

12.21.08

Stackoverflow Wiki Transciption

Posted in Uncategorized at 3:37 pm by Toby

I just translated my first 3 minutes of a stack overflow podcast.  Minutes 3 – 6 of podcast #34. 

At the end of each podcast joel and jeff ask for volunteers to transcribe their podcasts to make it easier for search engines to index and people with hearing difficulties to enjoy.  Today I thought I’d take a look.  Its kind of addictive, and it also takes quite a bit of time.  It took me longer than I thought to get through my 3 minutes.  YOu have to concentrate hard on the random gibberish that comes out of there mouths, but I would recommend it to anyone and everyone.  Pop over and do your 3 minutes.

10.31.08

Editpadpro

Posted in tools at 3:54 pm by Toby

I’ve recently been enjoying the thrill of finding some really good bits of software.  I’ve been around for quite a while – prehistoric by some standards – my first real programming job was in my Summer holidays in my third year in university back in 1996.  I worked for a software company that wrote stock market analysis software from a small house in hove with a great little language that had just been released – Delphi.

Anyway over the years I’ve picked up a few tools that I have come to find indespensible.  One of the very first of these was Textpad.  A great text-editing tool that loaded super fast and opened any file that you wanted, even binary files.  This was about 2000 and Textpad 4.0 served the niche I needed it for very well.  I bought a licence and have been using it happily and installing it on every machine I’ve owned or worked at every since.

They recently released a version 5, but I never really liked it.  They changed the interface; It took a bit longer to load and worst of all they removed it from the top level of the context menu in windows explorer.  I think they put it on the sendto menu, but that might as well have been a million miles away.

The windows explorer context menu is one of the most important menus in the whole system.  As a developer I am constantly drilling about different directories, opening up files of all types and sometimes you dont want to start up you IDE to take a look at that function in the file, a quick right click and select textpad and you had it open.  I do it on other peoples machine and come to an abrupt halt when I find they don’t have it installed.  We all have a particular favorite;  mine was textpad.

So I kept using 4.5 which was still wonderful, but I began to want to do things and found it all becoming a bit cumbersome.  At one point I even started writing my own texteditor that had some of the features I was looking for like automatic saving of temp files, regular expression matching of selected text to allow

context sensitive actions such as open a folder when you selected text that was a path.  It seemed a bit much to try to reproduce the other stuff though.

I happily trundled on using textpad whenever I needed to, but recently started looking around again.  One of the things I’ve been wanting to do recently is get some kind of tool that will format xml inplace in an editor.  Sure there are xml editors like xmlnotepad, but I wanted something that was part of my text tool rather than a seperate product.  I work with log files that have XML embedded in them so I sometimes have to copy and paste them out to look at the data and it is generally is formatted plainly so being able to quickly and easily format is really useful.  I eventually found a way of doing this in Textpad via a plugin that someone had written but it wasnt ideal.

Eventually I downloaded editpadpro.  At first I was a bit unsure, but I’m a big fan of JG Software and think Regexbuddy is a fabulous piece of software so I stuck with it.  Then the WOW’s began to arrive.

WOW 1: While exploring add in tools I found that I could do exactly what I wanted with my XML formatting.  I wrote a quick app in Delphi to format an input XML string  and spit it out.  Editpadpro passes the current selection to the tool via standard input and replaces it inline. Brilliant.

WOW 2: It allows you to change the type of a file (for syntax hilighting) at any time and even if you havent saved the file, which means you can paste in a bit of text: XML, Code, HTML and set the filetype and get highlighing and code folding on the fragment.

WOW 3: When a file you are looking at is changed on disk, rather than just reloading (which most editors do) it gives you the option of do a quick compare.

WOW 4 (and there’ll be more): It has a seriously cool search feature – Fold by Searchterm.  You can search for words in a document and then click the fold  button.  This then does a code fold on each line that contains your search text.  Need to list all the Create Table statements in a sql metadata file – search and fold.

When paying my small licence fee to get a full version of editpadpro I suddenly realised that I need to look around a bit more at whats out there.  I’ve been using a tool that has pretty much remained unchanged since 2000 and it has served me well, but now its time to look around and find out what else is out there. I’m glad some software companies are looking at the way people really like to use software and catering to it.

10.23.08

Stackoverflow

Posted in Uncategorized at 1:59 pm by Toby

Stackoverflow.com was recently launched after a long (well quite short actually) and very public incubation.  I greatly enjoyed listening to the podcasts and have sort of enjoyed using Stackoverflow.com.  It has some issues still to be sorted out, but I think is working quite well and will evolve over time.

08.03.06

Why is Visual Basic bad?

Posted in Programming, Uncategorized at 5:52 am by Toby

In a series of posts starting with Stiff asking a few programmers a series of open-ended questions about programming and being commented on by a few people including Jeff Atwood on Coding Horror. One of the comments was on how Linus Torvalds had made a small comment about how Visual Basic was quite instrumental in moving forward the cause of programming (moreso than more object-oriented languages).

For example, I personally believe that Visual Basic did more for programming than Object-Oriented Languages did. Yet people laugh at VB and say it’s a bad language, and they’ve been talking about OO languages for decades.

And no, Visual Basic wasn’t a great language, but I think the easy database interfaces in VB were fundamentally more important than object orientation is, for example.

I am opening myself up to be flamed badly here, but I think most of us would give a grudging respect to visual basic – even while burning Visual Basic books and chanting incantations of exercism on those still aflicted with the ill. Visual Basic was easy to pick up, it really put the rapid into rapid application design (though I think the phrase was introduced by Borland). It allowed very fast proto-typing, it allowed the creation of COM objects and ActiveX controls faster than anyone had previously though possible and it is was so much faster to generate code in than C++ that any company that wasnt writing device drivers in the mid 90’s to late 90’s would have been very foolish not to at least investigate its use in their development departments. It was also from Microsoft so “had to be good!”.

So what went wrong?

I can’t abide Visual Basic. I started learning a newly released product that I had saved up my pocked money to buy back when I was in university in 1995. It was called Delphi (I was one of the few people who didnt learn Pascal in university – instead I did POP11 – I studied Artificial Intelligence). Delphi had it all it. It had everything Visual Basic had, it made making Windows applications a breeze, it came out of the box with about 120 different components (Visual Basic at the time came with about 30), it was easy to create and on top of all this it gave you the control that Visual Basic did not when you wanted to dig a little bit deeper. I thought myself Delphi, as many people did and have remained a huge fan of this great system from then till now (although one must wonder how much longer it will last), I believe it was superior to Visual Basic from the day it was released to the day Visual Basic was axed (I dont count VB.NET), but history has shown that these emotional responses have little to do with the reality of the sucess of a product. As the 90s passed Delphi held it own while Visual Basic exploded out of all control possibly becoming the most utilised business software language in the entire world*1.

I inserted the previous paragraph by way of saying I am not a Visual Basic fan, but yet I am going to defend it after a fashion. The problem with Visual Basic is again as with so much that touches our lives – Microsoft.

Microsoft are responsible for the dirth of rubbish, unmaintainable, badly written, memory leaking utilities, business applications, enterprise applications and help us Lord mission critical applications running on almost every machine in the world that runs windows. They know this and that is the reason they created VB.NET and ensured it was not backward compatible and would require often an entire rewrite to get a VB6 application working on VB.NET. You see Visual Basic was victim of its own sucess.

I may be naive but I don’t think Microsoft actually ever expected Visual Basic to become quite the monster it did. I think they had a nifty idea to release a RAD application development environment for people to play around with. Maybe it would help some students to learn programming, write that little app for their parents business and then they’d move on to a ‘proper’ programming language like C++, but it didnt work like that. Sure the students learnt it, they wrote that application for their parents business, maybe they even sold a few copies of it to their parents friends who ran businesses, but then they went out and tendered for work against software houses writing in C and C++. The VB guys could do it in a third the time and at a third the cost. The people buying the time didnt know or care whether the language it was going to be written in was up to the job.

Further details to follow.

*1 – I made this statistic up, I dont know if it was but it certainly seemed like it.

05.19.06

Strange things people do with their time

Posted in Uncategorized at 4:26 am by Toby

Strange things people do with their time # 1

Watermelon Art.
http://www.hinddawn.com/incredible_pages/watermelon_art/index.html

Strange things people do with their time # 2

“The idea of someone picking their teeth with a screwdriver may sound amusing for a moment but it is actually a big worry that so many people are happy to use whatever is closest to hand to remove food from between their teeth.”

http://www.theregister.co.uk/2006/05/12/flossing_survey/


02.20.06

A missing forward slash.

Posted in Uncategorized at 7:34 am by Toby

I’ve been having some trouble again recently with a website I did for a client. This problem had reared its head before, and I could never pin down what was causing it until recently.

The problem is when at a certain point visitors to a site start viewing the non ‘www’ version of your site so

visitor goes to www.mycoolsite.com/shop/buysomething.php

and then later they arrive at

mycoolsite.com/shop/checkout.php

This isnt a huge issue except that it messes up cookies and lots of shopping carts are based on cookies. So the user gets to the check out and finds that there is no longer anything in their cart. Now I noticed this early on and tried to take steps to prevent it, but it has reared its head, and for reasons I wont go into, this time I had to track down the cause. And I finally did. A missing forward slash!

If you make a link to a directory (relative or absolute) without a trailing / it will redirect to the www less version of the url, so

www.mydomain.com/shop will load mydomain.com/shop/index.php
whereas
www.mydomain.com/shop/ will load www.mydomain.com/shop/index.php

now usually there is no difference, but in certain circumstances this can mess up things like cookies. So dont let it catch you out.

The origional answer I found is here.

http://www.weather-watch.com/smf/index.php?topic=7265.msg48681#msg48681

I admit a weather-watch website is rather an obscure place

02.17.06

New Blog

Posted in Uncategorized at 2:29 pm by Toby

I’ve started writing a new blog – Working with finalbuilder
with tips and tricks for this great tool for automating the build process. Check it out.

Getting payment plans right.

Posted in Uncategorized at 4:50 am by Toby

One thing that annoys many of us, is paying for things we dont use. Like a payment plan that gives you a certain number of minutes on your phone, or using a piece of software.

Fogcreek software recently released a piece of software called copilot which allows you to remote control someone elses computer (not much new there, but they provide a service around it that works, and makes it simple to use through firewalls etc). They have a payment plan which allows you to choose a certain number of minutes per month, so if you are a heavy user! you can benefit from cost savings. But Joel (the owner of Fogcreek) is always one to remove barriers to entry, and so has this little bit after his list of payment plans.

“Don’t worry if you’re not sure how many minutes you need: you can change the plan at any time, up until the last day of the month.”

Now you see the great thing here is that he will never loose a customer who is unsure of how many minutes they will need, infact rather than making less money (some traditionalists would say that ever customer who trades down before the end of the month is lost money) he actually gains money because he gets customers he would not necessarily have had otherwise.

I remeber once trying to organise a payment gateway for one of my clients and not going with a particular company because they wanted my client to specify at the begining of each month how many transactions they would be making. Even though the cost is minimal its the perception of wasting money that kills the sale.

10.26.05

A piece of advice from History

Posted in Uncategorized at 4:12 am by Toby

I’ve been using googles desktop homepage for a while now, allows you to have rss feeds and the like on a page, as well as google search. One of the feeds they provide is to the quotations page, and today I saw the following.

Quote of the Day

I would rather be exposed to the inconveniences attending too much liberty than to those attending too small a degree of it.
– Thomas Jefferson

Those in power in Washington would do well at this point to listen to the voice of those older and wiser than them.

« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »