Tyler On Everything

Categories


What Reviews Do You Enjoy Reading?

View Results

Loading ... Loading ...

Monthly archives


Search




Almost Volunteer Work

I agreed to make a website for the ski team. There was some stuff that I wanted to do with it. The first was to use some AJAX to load data. I also wanted to use a relatively clean googlesque menu system. I told them it wouldn’t cost them much. In and around the $1000 range.

Well the site is online now: www.clubmsm.org

I just put together my invoice and I included my hourly rate for this job. Yep $3.50/hour. Sometimes it feels good to help out a not-for-profit team. The hope is that at some point its appreciated.

 
1/52/53/54/5Best Post Ever (No Ratings Yet)
Loading ... Loading ...

Posted by Tyler Posted in: Coaching, Personal Life, Software 1 Comment » January 2008


Tyler vs. JavaScript/PHP/AJAX/Charsets/Form Submissions: Hard Fought Victory!

Web development is not refined. The whole industry seems to be quite kludgy, it seems like the whole thing was designed by a few guys sitting in their parents basement getting high on cough syrup. The idea of object oriented design seems to be lost on most projects, short of some of the newer .NET development, but even then, the quality of work I have seen is somewhat lacking.

That little rant has absolutely nothing to do with my current victory, it is just to outline the fact, that what has been done is not the right way to do things, what works in Firefox -a real browser- may not work in that piece of shit IE, and what works with old style form submission may not work with new fangled AJAXing.

Here is the battle that I was dealing with, and -I hope- a clear solution which I could not find anywhere on the web. I’m currently writing a multi-lingual website for a ski team I coach. By multilingual I mean English/French. For most of the admin console I have been using old style form submission, I mean why would I waste the fancy stuff on the backend. Yet I have a -quite kickass- photo manager that I have written and reused a few times now, that uses AJAX form submissions. This shouldn’t be any different right? Wrong!

The problem I was having is that some of my French characters (ie. ç, é, è, etc…) were getting muddled on the way to the database. As it turns out they were getting muddled in the transfer between the Javascript AJAX post and the php server side script. It appeared to me that I was doing everything right. I had my charset that I specified in the AJAX post correct:

ajaxRequest.setRequestHeader(”Content-Type”, “application/x-www-form-urlencoded;charset=ISO-8859-1“);

Or perhaps I didn’t so I switched it to UTF-8. That seemed to make no difference, a quick browse through the shitty information on the interweb led me to this:

Your are in luck! Transforming text in ISO 8859-1 to Unicode is the identity transform (as in no change at all), as the code points they share have the same meaning in both encodings. For all other encodings (save US ASCII, in part a subset ISO 8859-1), you need to resort to laborious replace() hacks.

Unfortunately that is a load of crap. For all the ASCII points they are the same, and I would imagine for many of the upper range characters that they share they are the same, but there is a range that is not shared. The latin characters that can be expressed as extended ASCII characters. For instance:

Character Encodings

As you can see the character encodings for ‘é’ are not the same between the two. This is where the challenge got interesting. Some more research let me determine that the Javascript function encodeURI() would always produce UTF-8 code, and I was specifying the charset to be UTF-8. Perhaps the problem was decoding the URL on the other end. I tried the PHP function urldecode() but it produced the same two character output. é transformed to é

It was at this point that I realized that there was an issue in conversion from UTF-8 to ISO-8859-1. Why was my PHP script not able to decode it? The short answer is that PHP does not support UNICODE, and you need to convert incoming parameters. Easily there are two easy ways to do this: utf8_decode or iconv, iconv appears to be only part of PHP5. I used utf8_decode() and it worked as expected. So the transformations appear as such: ISO-8859-1 charset page > UTF-8 encoding to go over the wire > ISO-8859-1 to be usable in PHP.

Did I mention that I find an awful lot of this I18N business very frustrating? Although I suppose that the multilingual nature of the world I have the choice of getting better at it or giving up being a programmer.

 
1/52/53/54/5Best Post Ever (1 votes, average: 1 out of 5)
Loading ... Loading ...

Posted by Tyler Posted in: Everything, Software 1 Comment » November 2007


This Developer For One Welcomes Our New Internation Business Machine Overlords…

Alright perhaps not overlords… It has been suspected for sometime that Cognos (my employer) would be acquired by a larger company. The even bets were on IBM, Microsoft, and Oracle. To be honest I didn’t really have an opinion one way or another as to whether this would be a good thing or a bad thing. For the record I still don’t.

I did feel that IBM was going to be the best fit for Cognos at least technologically. Microsoft is not an Java shop, and with their current position they never will be. With the current trend at Cognos that just didn’t seem like it would be good fit. From that perspective I welcome IBM. As with all of this M&A stuff there are bound to be some pains, but I am quite confident that I will come out the other end free and clear. And that is what really counts isn’t it?

As for the prospect -in about 3-4 months once the deal closes- of being a Big Blue employee. It seems good. A quick perusal of the IBM Canada benefits. It looks like the working hours are more flexible. I do like the idea of working 4 days a week -and spending 3 days a week skiing during the winter. As well in my travels I found a blog in regards to some guys work experience at IBM. It sounded positive for the most part with the exception of him getting low-balled salary wise on entry.

Step No. 3
Learn from my own mistake… Do not accept a job with IBM unless your starting salary is appropriate for your education and skill set. Check with your professional organizations to make sure the IBM salary offer is what the industry pays. IBM benefits are no longer the industry’s best, but simply industry standard, and salary is the only negotiation you control at the beginning.

All in all it sounds like a pretty good place to work. Perhaps not Google good, but what can you do this side of working for Google. As for what this means for Cognos as a company? Well I’m not a business guy but I do think that it will allow Cognos to be more competitive with larger organizations, but that isn’t my forte and if you really want evaluation on the IBM purchase there are hundreds of articles to the effect.

 
1/52/53/54/5Best Post Ever (No Ratings Yet)
Loading ... Loading ...

Posted by Tyler Posted in: Everything, Personal Life, Software, Technology No Comments » November 2007


Where Google Falls Down…

Google rules. They release a seemingly endless array of cool products and a seemingly constant pace. Everytime they turn around they are releasing some product that I use almost daily.  Yet there is one product that I use daily that isn’t perfect, or even particularly good: Google Desktop.

The best feature of Google Desktop is the ability to hit <ctrl> twice and have a search window pop up. The list of flaws is endless.  My first issue with the product is that if you quickly type in your term (ie. ‘mysql_connect’) and hit enter, its first inclination is to do a web search. This is a huge flaw in my mind; I downloaded Google Desktop to search my desktop not to have a faster interface to the web -quite frankly the Ctrl-K in Firefox to put focus in the Google search bar is fast enough.

The second issue that I have is the workflow to search for something specific in some specific location.  My standard workflow goes something like:

Its at this point that I may have some results. There are huge flaws in this behavior. Why are they advanced options not visible on the page, they are not that advanced. Why do I have to select ‘Enter other type…’ to tell it what type I want, I should just be able to enter the file type I want, as well it would be nice if the file type I entered would get added to the drop down list. Now the location I want to search is saved to the list, but I don’t like having to use dropdowns and it only saves 3 items. I would like it to be able to type and have it auto complete.

Now is there a better option? Yes there is! Copernic Desktop Search Engine has a much nicer UI that is greatly easier to navigate. Why do I not use it? Because my version has a bug where if I enter things in quotes -ie. “require_once(’fileName”  it will find nothing- so it is unusable to me.

What does Google need to do to fix the desktop search? Well for starters improve the search results window to make easier use of advanced options. After that is complete then it can start looking for other intelligent googlesque usages. Such as a right-click in Windows Explorer that had a ‘Search With Google…’ option. This would allow you to quickly search a folder that you are in for a term. What a great feature, windows has it, but it is terribly slow an ineffective. Oh well perhaps the support is better in Windows Vista and windows will win the desktop search battle because Google is throwing it away.

 
1/52/53/54/5Best Post Ever (No Ratings Yet)
Loading ... Loading ...

Posted by Tyler Posted in: Everything, Software, Technology 1 Comment » October 2007


Stream of Conscious Emails

I am guilty. Very very guilty. Do you work with people like me who do this? I am starting to think that it is very common in the software industry.

To explain the torture that I am providing people, the situation plays like this: You receive a question, you think quickly and realize that you have a clear and concise answer to the question. It may not be the answer you want to provide, you may be saying something to the likes of ‘this will be very difficult and time consuming‘, as you continue to write and explain why this will be difficult you start to realize that maybe just maybe there is a really smart solution to the problem. Before you know it you are starting to explain your solution and maybe just maybe things won’t be as painful as you originally estimated. Now you are rethinking and saying things along the lines of ‘if we can find an elegant way to solve this one issue…‘ but you start to realize that there may not be a good solution to that problem. Now you are wondering is my design flawed? and this starts to find its way into the email by way of perhaps a quick little refactoring exercise in this location. You realize that what you have said is starting to make less and less sense, and that you yourself are confused and you are worried about just how confused your reader is. You finish off the email by saying that you are pretty confident that you can complete the work in a week. This date means nothing and you just picked it because it sounded kind of safe. You end the email by saying that you are concerned that you have confused the issue further and to please phone you tomorrow if there are questions. There most certainly will be.

So. Do you have any questions? I do. Why do I write emails at the very end of the day?

 
1/52/53/54/5Best Post Ever (No Ratings Yet)
Loading ... Loading ...

Posted by Tyler Posted in: Everything, Software No Comments » October 2007


Why www.Chapters.ca is a terrible terrible website

There are few things that irk me like a terribly designed piece of software. The current subject of my wrath is the trendy, Starbucks© shilling mega-store Chapters. I don’t dislike the place -even though the prices are more expensive in the store than they are on the website; how the hell does that work?- the atmosphere is alright, and the prices aren’t terribly worse than Amazon.com… but one thing is just unacceptable: Their website!

I am currently looking for the book Chi Running which I hope will aid me in battle of shin splints -which I am sure that there will be many blogs about in the future. I was recommended the book in a thread on the Runner+ message board. My first thought was to go to the old standby: Amazon.ca. Of course they have it and the price is right $12.78. Unfortunately the shipping costs -shipping is free on orders over $39- will completely wreck any savings. So I head over to Chapters.ca and I can’t bloody find it. Eventually I do find it but I have to take a little bit of a roundabout route.

Here is how to find the book ‘Chi Running’ on the Chapters.ca website:

  1. Goto Chapters.ca
  2. In the search box put ‘Chi Running’
  3. When nothing appears get frustrated
  4. Open a new browser tab -you are using FireFox right?
  5. Navigate to Amazon.ca
  6. Search for ‘Chi Running’
  7. Click on Chi Running link
  8. Copy author name: ‘Danny Dreyer’
  9. Go back to Chapters.ca tab
  10. Under the Advanced Search panel > Author paste ‘Danny Dreyer’
  11. Hit Submit
  12. Click on Chi Running link

There that is it! That is all that is necessary to do in order to find the book ‘Chi Running’ at Chapters.ca. This really makes me want to go shop there. Regardless I will probably end up there tonight to look for the book, and it will probably end up with me getting upset at some poor student who gets paid $9/hour because the book is $2 more expensive in store than on their terrible website. Can you tell that this scenario has played out before?

**********************Edit**********************

So I went to pick up the book at Chapters. They refused to match their own price on the website. I couldn’t understand why they wouldn’t. They said that it was like they are two completely separate companies. It was at that point that I mentioned that reputable companies will match their competitors prices and even give you price protection. Well this will mark the end of my relationship with Chapters… and Indigo… and Coles… and SmithBooks…

Hmmmm that doesn’t really leave much in the way of competition does it? No wonder they aren’t willing to match a competitor’s price, there aren’t any real competitors. In the online market they have to deal with Amazon, so they will lower their prices. Well I have some real reservations about a company that will not match their own price.

 
1/52/53/54/5Best Post Ever (No Ratings Yet)
Loading ... Loading ...

Posted by Tyler Posted in: Everything, Software 1 Comment » September 2007