Friday, August 18, 2006

Why I won't see dumb movies

Snakes on a Plane. Just for putting that there, Google will link to it along with the millions of other references on the net to it. But I refuse to go see it, even if it is a result of bloggers building a mass hype around it. I refuse to pay for the crap that Hollywood throws out, even if this movie is a parody. That is to say, I'm not against parodies in general - no, in this case it is because they are not really making fun of anything in particular, other than people will spend a lot of money on purely hype.

Demand better movies people! Demand quality for your money!

Thursday, August 17, 2006

C# hypocrisy and delgates

After spending more time than what it should have, I finally got a delegate to work with an asyncronus thread. The problem wasn't the code so much as not being able to find clear instructions on the net on how to implement it.

One of the problems is that examples on the net often take the shorthand approach of putting multiple classes in a single file (or at least what could be a single file). For example:

namespace blah
{
class firstClass { ... }

class secondClass {...}
}

the compile can deal with this fine. But if you apply it to a windows form to use in a thread as I was attempting to do, the program crashes as soon as you attempt to go to that form, with the error of "System.Resources.MissingManifestResourceException" as explained on MS's support site.

I eventually had to copy and paste to notepad, delete the file and re-create it. I wasn't impressed }:( as this code is being used in production, and although I have backups of it, having to rebuild a file like this shouldn't be necessary.

So I created a class to use for the delegate. The next problem I found was the poor explanation of how a delegate needs prescisly the same parameter names as the method you are going to call (not to mention the same return type). For example:

namespace whatever
{
class Utility
{
...

public void myMethod(TextBox box, string message)
{
box.text = box.text + message;
}
}
}

namespace whatever
{
//I've separated this out to make my point...
class targetClass
{
private System.Windows.Forms.TextBox messageTB;
private string message;
delegate void myDelegate(TextBox box, string message); //notice it matches as above

...

//inside a thread
message = "the message";
myDelegate md = new myDelegate(Utility.myMethod)
this.invoke(md, new object[] {messageTB, message});

...
}
}

This may not be the most elegant solution, but it works. - maybe this will be a bit clearer on how delegates look and operate when being used in threads.

Tuesday, August 15, 2006

WSE and Thread Safety

I love working in .NET sometimes...

For my application that I'm working on, am using Microsoft's Web Service Enhancements (WSE) for ensuring security of uploading and downloading of sensitive data. However, I also need to implement some thread safety on it, so I don't have the users starting multiple worker threads while the first is still running. SO -

I put in a lock as is commonly used. The lock itself works fine, it will only allow one worker thread at a time to try to hit the server that I am connecting to. But then I get back an uncaught exception which causes problems: System.Thread.ThreadStopException. Now this is apparently an exception that is supposed to not be implemented in a developer's code, is not documented in MSDN, and only occurs "*very* occasionally". So apparently, I have a bug, but I am not allowed to see what it is or prevent it from screwing around with the program. Hmm, this is probably something stupid that will take me several hours to find...

Sunday, August 13, 2006

Blogs, Celebrity, and media

Although I haven't posted for several months (moving to a new home and WoW taking a lot of my time), I am struck by the increasing power of blogs in mainstream media and the creation of instant celebrity by some of the most famous bloggers out there. First, there is Amanda, of the Rocketboom fame, catapulted from a star of the hardcore net users to being on tv and in the press. Then, there is Josh Wolf, fighting for his rights as a video blogger - CNET is posting his story and noting that traditional media powers are now supporting his legal fees, which I find interesting.

Both of these are showing the power of blogging and how it beginning to affect even traditional media and how one can go from obscurity to being (a little) famous when fate grabs hold. I do have much more respect for this type of fame than that shown on the various reality shows that tv seems to not be able to rise above. I guess even the masses need something to cling to...

Other evidence of the growing power of blogs was shown in this weeks edition of The Economist, where a fairly large article was published about the increasing use of blogs by professional economists. While the Economist is fairly open to grabbing on to new movements in technology and society, it is amusing to see how what was once considered a thing of online nerds is becoming more and more accepted by media as being a legit way of reporting information.

Of course, the rights and responsibilities of bloggers are still being resolved as several people have been jailed, such as Josh, to people loosing their jobs for blogging, like Petite Anglaise (who I think has a kick-ass layout and color scheme for her blog).

Speaking of layouts and color schemes, definetly time to work on the css for this blog...

Sunday, November 27, 2005

Back in action

The first post in five months - just got too busy and was too distracted for a while. Didn't help that I finally bought World of Warcraft in August...

Nevertheless, things in my life are going smoothly as we head into the Christmas season. I've been a full time employee at RTS Services doing a solo software project for our sister company Wespro. It is amazing how much I am still learning, especially as the project I am responsible for involves a windows client on a laptop talking to a SQL server on a database via a webservice that I had to create, with a web application to do reporting and db administration. My XML is finally getting better as I am having more exposure to it.

Last week I attended the Microsoft Visual Studio and SQL Server 2005 launch here in Calgary. It was the first big Microsoft event I've attended and it was interesting to see. The amount of money they must be spending on the launch events across North America must be staggering, but I guess they make it back in spades later with the sale their products. Got some worthwhile freebies from it as well as a day of marketing, although I probably won't be wearing the t-shirt that they handed out to participants - I'm not going to proclaim myself as that much of a computer geek =:)

Sunday, June 05, 2005

First solo client site is up

Well, I've finally got my client's site, Pinnacle Consulting Services, up and running. I've still got a few pages to go and a php page to upload files to allow for the dynamic creation of a client list, but for the most part it is finished. Thankfully, I'm in negotiations for a longer contract right now and may also get the chance to work for another company (although I don't know yet if they want me as a contractor or an employee), doing stuff related to SCADA - it is in the petroleum and natural gas sector, so I'll be happy if I can get it. As everybody in Calgary knows, this is the sector that really counts for getting experience in, regardless of your discipline.

A busy week coming up with some meetings, a Microsoft presentation on Tuesday and of course my MCAD/MCSD certification group meeting, along with the finishing up of the above mentioned website and writing our a proposal. At some point I should also redesign my corporate site - I've found a lot of graphic design ideas that I want to incorporate into it...

Meanwhile, I'm struggling to determine how to shape my career. Being still in the Junior/Intermediate level, I see conflicting reports in the media about the future of IT, from IT being one of the best growing industry's in the next few years to IT being reverted to mere support for companies with little use for new developers. Meanwhile, companies are always wanting more skills with more years behind each skill just to give an interview to a candidate - going for more bang for the buck I guess. However, from a developer's position, it is ridiculous - we must both be super specialized, but a jack of all trades at the same time. To complicate matters furthers, there are reports of companies now looking for management and business-related skills to further increase the value of new hires. So, should I continue with academic learning? Should I struggle to etch a niche for myself in this extremely fast paced industry where technologies change within months? So far I'm going with the latter, as I feel it is my lack of experience in general that hampers me the most for looking for sustainable employment...

Thursday, May 12, 2005

.NET is a go

Well, the Calgary .NET User's Group is finally on its feet after a two year hiatus - we have finally received MCAD/MCSD certification books from Microsoft and we are forming manageable groups for studying for the exams. Also, as one of the managers, I know that we have a speaker booked for the end of June - I just hope that there will be enough interest to overcome the summer lull in interest. Overall though, it seems that the group is starting strong again.

Also, I just wrote the first test in the Last Developer Standing competition that is being put on by Microsoft Canada. I only got 6 out of 10, should have done better, but it is difficult trying to think of software issues in terms and words. Hopefully I'll make it to the next round - I'm not sure how that works - possibly passing those beyond the average?

I'm working slowly on three different projects, one for a friend and two for money. The one that should be taking not much time, a project that I took on the understanding that it was just putting a site back onto the web is a nightmare - missing files, little documentation, no general over-arching plan of what the application looked like originally. It is in ASP and JavaScript - with the number of key files that are missing, it would be faster for me right now to re-write the whole thing in .NET than to try to reconstruct the missing pages...

On the other hand, I got a temp webpage up today for my friend Kyle's company, Rockies Bio-Diesel. Now to design a good page for him, further extending my portfolio for my company. My other client, Pinnacle Consulting Services, still has a temp page, but I've got my client near to choosing a final design for the site after we have been through several different layouts and color schemes. Not what I would like, but my job is to make my client happy. The actual content shouldn't be too bad (*fingers crossed*), and then it is creating some dynamic pages with PHP.

So busy times here in Cowtown for me...

Thursday, April 07, 2005

A little sidestep

Ok - a bit of a plunge into the bru-ha-ha of the Gomery Inquiry (A.K.A. Adscam, A.K.A Sponsorship Scandal) here in Canada. From the perspective of an internet user and a blogger, I find the Attorney General of Canada's reaction to Captain Ed's website interesting and somewhat depressing. There may be a media ban in place, but I do not think that this precludes Captain Ed's source from revealing information to Captain Ed. It doesn't really matter who Captain Ed's source is - the fact remains that Captain Ed is writing from a personal blog in America. He is not media - at least, nobody has defined blogs yet (even political blogs) of being media and therefore having the rights and responsibilities that the press have.

It seems to me that companies and governments in the Western hemisphere are trying to play blogs both ways - as a tool to be used when it suits them (like for positive advertising) but not allowing the freedom of expression that is granted to a person who is writing in a personal blog. The guy who got fired from Google for writing his personal opinions is another example. Personally I think that for the protection of the general public, some base definitions of a blog need to be nailed down such as definitions of personal versus special interest blogs and the rights and responsibilities that each type should be accorded. There - politics, law and computers rolled into one...

BTW, yes, I am using the comic the Captain Ed also posts - I find it interesting both from a political side and from the technological viewpoint

Sunday, April 03, 2005

Keeping Busy

Although not much has happened to me in the past couple of weeks, I've been occupying my time outside of my job search with learning new things and re-acquainting myself with stuff that I haven't used for a while. Last week I spent some time relearning XML & XSLT which I mostly knew. Then, on Saturday, I studied through Core PHP Programming for PHP5, which is essentially C++ but more specialized for web development. It looks like most other modern languages, although it is easy to figure out its origins and original purposes - although the newest version of PHP can be used for large scale web application, it still doesn't look like it was designed for it originally (which it wasn't obviously). One thing I don't like about PHP is that is not strongly typed - a variable is defined by the $ in front of the variable name, and the variable can be anything - a string, a number, an object. To me personally, this seems to encourage sloppy programming, possibly leading to problems with code maintenance, especially if this is a language that is to be used for large scale application. Also, I have to admit, I do prefer dot (.) notation to arrow notation (->) when accessing methods and properties of a class - easier to type with a period.

This past week has also seen me finally get a GMail account - I was invited to an account by a friend. I think it is ridiculous that they have not opened it up to the general public yet - its been in Beta form for a year roughly - how much does it take to know if it works well? There are enough people using GMail now and inviting others to open accounts that it will snowball, and those servers better be able to handle the load... I guess what I am saying is that not making the access to accounts public is a redundant policy and not the most client friendly - either you are or you are not a public webmail service. Getting the new account also made me realize how little I actually write emails now, in terms of writing to friends and relatives. Maybe I have grown too complacent about emails?

There has been one interesting thing happening for me though - I have been invited to be a member of the Executive Council for the Calgary .NET Users Group. It is a volunteer position, but I know I need greater visibility for more employment opportunities. It will also be nice to do something that isn't purely tech related again, similar to when I was doing work for the Canadian Consulate in Chongqing, China as an intern. Regardless, some different stuff while getting to meet new people.

Wednesday, March 16, 2005

Busy day of seminars

I spent yesterday taking part in Microsoft Canada's TechNet Winter Tour 2005, which was here in Calgary. Pretty interesting stuff, but it was the seminar was about MS server family and security issues related to this. Being a developer, most of the topics covered were not related to the work that I do, although I did learn more about MS Virtual Server. Plus, I got a t-shirt & some demo software... Then, last night I again went to the CAMUG (Calgary Agile Methods User Group) meeting where the discussion was about how all the various stages in development, from design to testing, compliment each other when using agile methods for software development. As a bonus, on of the speakers was from ThoughtWorks, and as I have an interview with the company next week, it is nice to glean a little bit more information about the culture of the company.

The other big thing that I've done in the past couple of weeks was to revamp my personal website, which I had not done any serious work on for more than a year. I used a template from Dreamweaver for it, being too lazy to really want to think out a whole new layout scheme in CSS for it, but I heavily modified both the webpage and the underlying CSS file. Also, I managed to get it put together well enough to validate for the W3C XHTML 1.0 standardization GIF, having to modify some of Dreamweaver's pre-installed assumptions. Personally, I believe that all browsers should conform to the W3C standards - the internet needs a strong common base for webpages to be universally accessible and the responsibility of this universality should not rest on the shoulders of the developers to micro-manage their code for different browsers.

Nevertheless, after confirming that my personal website was ok, I went to the Iconic Solutions site and checked there. I found that I had to make some changes to the rounded corners control that I had found from the 4 Guys From Rolla, who did not include "Alt" variable that is required in XHTML 1.0. Almost got the whole site, but the I have yet to figure out how to get the Calgary weather flash applet that I found on the City of Calgary's website to be coded correctly in XHTML. Oh well, something to work on...

Thursday, February 17, 2005

HTML parsing

While working on my new personal project today, I came across an unexpected problem - how to parse an html file using C#. My business partner Shawn had previously done something similar using VB.Net, but this was my first stab at it. Luckily, there are a number of people who have already dove into this area, so it wasn't hard to find some answers. My first find was the best - a guy named Jeff Heaton had already created a number of classes in C# to address this problem and put them out under Limited GNU Public License(LGPL). Although these were easy to implement and worked without any difficulties, I quickly ran into a limitation - he had designed his classes to be used as a spider and was only interested at the attributes of the html tags (like 'href' attribute in the 'a' tag). Unfortunately, I need the descriptive contents of the tag, i.e. the words between '' and ''. My first attempts to modify his code have left me getting the urls and descriptions of half of the links - it skips every second one... So tomorrow will be trying to re-engineer the whole thing to get what I need.

Well, on my continuing search for employment as a developer, I am noticing some sights using Macromedia's Flex technology. First, there is my past client Launch Vision and a site they have developed, Stem Cell Therapeutics. Nice job guys - both of them look great! Also, I'm pretty sure 5By5 Software is using it at least partially for their product. Looks like it is definetly a growing technology, at least in Calgary...

By the way, I have found one of the most annoying things I've ever seen in Windows tonight - I accidentally held down the shift key for 8 seconds (my thoughts were drifting as I was listening to some tunes) and this dialog popped up! I pressed cancel, but it was too late - the "Filter Keys" option had been engaged through the Windows Accessibility option. The most immediate effect was not being able to point my mouse to a new point on a page and position the Ibar there - instead it would highlight from the first point to the new point! I was trying to code and this was infuriating! Well, after checking Google out, I found a page that allowed me to get by it (I unplugged my keyboard and plugged it back in), but now this stupid little stop watch is in my display icons in the taskbar and I can't get rid of it! I've hidden it and hopefully when I reboot the computer it will go away... But who thought of this?!

Tuesday, February 01, 2005

Lean Software

Tonight I attended Mary Poppendieck's talk about Lean Software development that the Calgary Agile Methods User Group (CMAUG) was putting on. It was interesting - Lean Software Development essentially boils down to streamlining the whole process so that software is made when requested by a client and is developed with the client in mind. It takes the larger view of the development cycle where Agile development is a part of the process, rather than being focused purely on the development.

I was wanting to talk in depth about it but my ISP was down for a while and so my thought's have gotten mixed up unfortunately. Regardless, one of the things she talked about was Just In Time development. In a manufacturing environment, a company wants to have as little inventory of finished product as possible on hand - better to create as needed (as Dell has much to its success). From a development perspective, Mary argues that inventory in software is any piece of software that is exists in a semi-finished state (i.e. code that addresses a goal and is tested) that is not making money. I realized that this was essentially what the project that I recently finished was - and it was a failed project.

Another concept was that of releasing software as soon as it addressed a basic goal. Once this has been done, features can be added in any order. From this perspective, the timeline between iterations would be very small. Also, Mary believed that the organization of human resources in software projects was in itself wasteful, wanting teams to stay together through different projects, allowing for greater cohesion and specialization.

My thought on this goes a step further - a team as a whole should follow the project through all cycles, from design to implementation, to testing, and finally deployment. While I recognize that there is the need for some specialization and people have different strengths and weaknesses, my thoughts are that as a worker in IT, I already have to know the basics of everything. I'm a developer, and not only that, a contractor who handles custom projects. So, I have to be able to take a project through all the cycles. Also, as everybody in the industry knows, it is a constant learning process - new technologies and new methodologies. So my suggestion is this - have the team work together throughout the various stages, but the person(s) who specialize in the area lead for that section with the project manager to keep the project focused on the needs of the client. So the architect would lead for the design of application, the developers would code the design with the architect looking on, and all taking part in testing with the QA people designing the tests for the application, with the others implementing the tests. Keep the team in a smallish area (but not cramped - just not spread out through a building) and allow them to work on very short cycles.

Just some thoughts...

Monday, January 24, 2005

Working with Atom

Well today my big feat was grabbing the Atom feed that this page generates and writing it to my personal page on the corporate website. I've created redundancy! The process was actually incredibly simple - I just grabbed a pre-existing ASP.Net application for parsing Atom from SourceForge and just set the program to grab the feed that Blogger sends out. The actual code is nothing, which is really sweet.

Now, if I can get the company hosting my site to allow me to change the permissions on my folders so that I can have the rounded corners that are supposed to be there...

Monday, January 17, 2005

The struggle for faster XML

Interesting - I just finished reading a CNet article on trying to make XML faster. Apparently there are a number of projects trying to make XML formatted in binary, so as to compress the information and make it faster to transmit. Of course the fear is that the differing projects and the differing goals - like mobile services vs. commerce transactions - would lead to diverging strains of XML. Then there is the counter argument - make networks transmit faster...

My thoughts: I think that I prefer the creation of compressed streams. The reason I feel is that we should as developers always be trying to be as efficient as possible with limited resources. This is similar to how software companies in the past decade have relied on computer hardware to become faster with greater amounts of memory while being lazy with how solutions are implemented. As for creating divergent streams of XML, that may happen, but as long as they are derived from a base and can be converted to each other I don't think that is a problem. However, standards will need to be enforced, either by the W3 Org or another organization (but preferably out of a corporation's or a group of corporations' hands...)

Thursday, January 13, 2005

Another development tool to learn

My colleagues here are beginning to play around with Macromedia's Flex platform - it is sweet! Really nice, smooth controls with an elegant looking GUI. Loaded with lots neat tricks that would require a lot of coding in .Net framework and Javascript requires very little coding in the Java based environment. Another nice thing is a compact, fully explainable API (anybody who has developed with .Net knows what I'm talking about - how many thousands of pages are on MSDN?) I think that when I get some free time I'm going to download the demo version and start playing with it - of course to be able to afford a full version of it will be a ways in the distance because of the costs.

But in the meantime, back to Java and re-learning XML and getting used to the Flex environment... It will be fun get some knowledge and experience on a tool before it becomes too common - might even gain me an advantage in the marketplace to get some contracts. Of course, Macromedia's current charge for hosting Flex sites are going to keep all but the biggest companies away for a while, but until then, a small window of advantage.

Saturday, January 08, 2005

Moving forward on the company

Well, it is back to marketing the company I co-own. So I've started to develop the corporate website for Iconic Solutions that we've been putting off for so long. While pure web design is not my forté, it is nice to be something that is purely for myself without having to worry about other considerations (other that respecting my business partner's sense of esthetics). Got to do a lot of other things to get a contract, but I figure that I had better get the marketing infrastructure in place first.

Well back to it...

Wednesday, December 01, 2004

Is there a Flickr?

I learned about Flickr while reading the Globe and Mail online tonight. Apparently Flickr is a web service that allows users to post, organize and share photos by making storing the digital images in a database and using the service to move the information back and forth quickly. This is supposedly being hailed by the blogger community as the next step in the internet, but I remain unconvinced. This is partly because when I tried to go to Flickr the address wasn't found. However, Google does have it listed at that address. So where is Flickr? Anyways, definitely something to mull over - there have got to be a million applications/processes that can be redone to take advantage of this technology now that it is maturing... need to think...

On a seperate topic, I was attempting to find a new icon for MSN Messenger the other night on deviantART, specifically trying to find pictures depicting the heoric socialist workers (long story, but I find this particular style of art interesting, in part because it is so overdone, but also the just the how the various elements are shown). I can find many pictures of Che Guevera, the Hammer & Sickle, and other socialist designs (or conversly, fascist pictures, anti & pro-American, etc.) on the website, but almost none of the type I was looking for. I was rather surprised that with such a plethora of socialist icons, that the heoric socialist worker pictures were not to be found. An oddity on the net where almost anything can be found!

Tuesday, November 09, 2004

From Agile methods to empowerment

After attending an evening presentation of the Calgary Agile Users Group at the University of Calgary, I was again amazed by the statistics concerning the number of project failures in software development.

The evening's presentation was originally scheduled for "Architecture" in development terms, but it was more to do with how to increase the probability of project success using agile methods. While most of the developers there were C++ or Java developers, I could picture how the Launch Vision projects could be better utilized to provide better development. One of the points that struck me was the need we have for more testing, particularly acceptance testing. While we are under time constraints and we are always learning new or more efficient methods of programming, we forget the need for testing in the effort to get the software that we are creating into the testing environment.

Another point I thought was important was the speaker's idea that more craftsmanship is needed in software development. It is probably true that the majority of developers will take the easiest path to get a product working and out on time, regardless of whether or not it is the best method. The problem, I think, is that we developer's do not see ourselves as professionals - maybe misfits, rebels or whatever cliche you want, but in fact the majority of coders work in professional or at least semi-professional environments where our products are created for specific needs and usually for specific clients. I've thought for a while that people in the IT industry - specifically developers, architects, testers, projects managers, etc. - should be in a professional society, similar to those for professional engineers. Just a thought, but I think it is an important one...

Friday, October 08, 2004

Another busy week ends

So, this afternoon was taken up by figuring out how to get an error page working on the application - not that the page itself was difficult, but trying to get the application to fire it back the error message and stack trace back to the client side was tricky. I got it working through using a cookie in the global config file, using the error messages as string values that the cookie held. Then I set a one minute limit before the cookie would expire. On the error page (set in the web.config file) the cookie was picked up, the strings split out of the cookie, and then set into a nicely formatted page.

I realized today that I'm going to have to give a talk to the interns about holding values in the session - it is really useful, although some are having trouble grasping the concept of it. Need to better explain it, I think.

Tuesday, October 05, 2004

A new competition

The Patent Insider team started a stock buying competition on Virtual Stock Exchange today, to pit our investor instincts against each other, as well as test the application that we're working on. The competition would seem strange to an outsider as most of the action will be on Tuesdays only (when the patents come out) although the selling could happen at any time, depending on what each of us feels is the optimum selling point for a particular stock that we hold.

Useful stock symbol: Biotechnologies Index (AMEX) on Yahoo Financial - ^BTK