15 Rules to Better Code
August 30, 2005 on 9:25 pm | In 31 Days to a Better Blog, Geek | 2 CommentsWell, I was at TechEd today, and quite by accident ended up in Adam Cogan’s session on 15 Rules to Better Code & Tools to Keep Your Code Healthy.
disclaimer: this is all typed up from hurried and garbled notes taken during the session!
Adam Cogan is Chief Architect at SSW in Sydney, Australia.
The session was mainly about erradicating bugs from your code and achieving consistency throughout your business.
Adam explained that erradicating bugs could be achieved through the use of Test Driven Development and Unit Testing. He also talked about integrating NUnit and respective Unit Tests into the release of your products for users to run when everything goes wrong on their machine when it works on yours.
Unit Testing is especially useful when an application has dependencies and operates under the .Net JIT compiler, for fragile code such as regular expressions, and for difficult to spot bugs like rounding and arithmatic.
Areas which Adam talked about applying Unit Testing to were MS Access, SQL Reporting Services, and Javascript (JSUnit).
He also mentioned that it can be very useful when testing database schemas and for reconciling databases - ie. when a client has fiddled with the backend db of your product, thus rendering the application useless or ineffective, and is blaming your coding for the problems. Running the reconcile test will show that the DB has been tampered with - subsequently absolving you of any responsibility - Brilliant!
Adam then went on to talk about MS FxCop and how it can be used to scan for inconsistencies in yours and your colleagues coding methods - and also about a tool that SSW has produced called SSW Code Auditor - which analyses for inconsistencies by applying a series of configurable rules to scan your code files with regular expressions. This can pick out such inconsistencies like buttons being different sizes and Check Boxes not having mnemonics.
He also raved about how good JetBrains Resharper is - which is not exactly difficult since it is a superb coding tool - and their dotTrace Profiler tool for performance tuning your .Net applications.
Finaly, Adam talked about the importance of not breaking the build on the build server - i.e. always test changes before checking in, and don’t check in if tests don’t work.
And that was about it really. Obviously it was much better being there than reading about it from my brief notes. If this sort of stuff interests you then I suggest you read some of the articles on the SSW website.
Also, if you ever have the good fortune to meet Adam, be sure to get him to tell you the story of the laser treatment he had done on his eyes during a trip to Brazil.
Related Posts:
GoDaddy Again
GoDaddy
Chitika eMiniMalls
Performancing Metrics
Adsense Tweaks
Day 29 - Roundup
August 29, 2005 on 9:57 pm | In 31 Days to a Better Blog, Blogging | No CommentsWell I’m feeling pretty zombified after sitting through about 8 hours of Microsoft TechEd presentations in Auckland today - listening to MS guys talking about SQL Server 2005, ASP.NET and Betsy Aoki’s talk on The Power of Blogging.
I can’t believe it is day 29 of my 31 Days to a Better Blog project - and what is more, I can’t believe I have learnt so much about Blogging - or indeed, that there was so much to learn, and so much left to learn.
As you can see, I haven’t posted for a couple of days due to another family weekend. I must say that it has actually been quite nice taking the weekends off from the computer.
I think that I’m now going to make a start on some kind of article to document and post about my experiences of this August and my introduction to the adictable process of Blogging.
Related Posts:
Day 20 & 21 - Roundup
Day 7 - Roundup
Day 15 - Roundup
Day 9 - Roundup
Day 16 - Roundup
The Power of Blogging
August 29, 2005 on 9:37 pm | In 31 Days to a Better Blog, Blogging | 2 CommentsI’ve just spent the whole day ad Microsoft TechEd - which is an annual conference that Microsoft puts on for IT professionals - and was fortunate enough to be able to attend a session called The Power of Blogging given by Betsy Akoi - who is the Microsoft Community Program Manager in Redmond and is responsible for the blogs.msdn.com and blogs.technet.com sites and the ongoing rejuvenation of www.gotdotnet.com.
Betsy talked a fair bit about Community Server (Since it is a Microsoft Event) - The components that it is made of and it’s development history. She then went on to discuss her philosophy of Blogging and some tips from herself and her colleague Robert Scoble.
So I picked up my pen and started to scribble furiously. Unfortunately, there was a lot to cover, and Betsy gave the PowerPoint presentation a hammering! Here’s what I did manage to get down before deciding to ask Betsy for the presentation file after her talk:
- Build Momentum
- Find about 50 Blogs to read and get a feel for your topic - study the Blogrolls of those Bloggers
- Comment on their Blogging - and if relevant - link back
- Promote
- Use Blog Search Engines such as Technorati, Feedster, PubSub. Spend a month absorbing what goes on in these sites.
- Create credibility
- Other Stuff
- Fight comment spam.
- Think about what you are posting.
- Look for your typos and spelling miskates.
Apologies for this looking a bit stark and garbled but I can only just read the shocking notes that I made during the session (I’m now dreading next weeks development meeting when I have to report back to my colleagues about everything I have learned at TechEd).
I promise that when I get the PowerPoint presentation from Betsy that I will blog about it in more detail!
So thanks for the great presentation Betsy - and.. err.. sorry - I’m afraid I don’t use Community Server.
Related Posts:
Day 29 - Roundup
favicon.ico - Typo
Gerald Celente in New Zealand
Purpose of Blogging
Day 31 - The End
Microsoft TechEd - Auckland 2005
August 25, 2005 on 10:23 pm | In Etc..., Geek | No CommentsI might be attending Microsoft TechEd in Auckland (New Zealand) for a few days next week. If anyone is going to be there and fancies meeting up to shoot the breeze - then email me or leave a comment.
Related Posts:
Day 29 - Roundup
The Power of Blogging
Kia Ora
It’s Christmas at Accidental Entrepreneur
It’s official, He’s a 4 Figure Online Worker!
Days 22, 23, 24 & 25 - Roundup
August 25, 2005 on 10:19 pm | In 31 Days to a Better Blog, Blogging | No CommentsOh no - I haven’t posted my daily update for the last few days - Well quite a bit has been happening:
I’ve been using a new methodology for my work as a Software Developer. I’ve broken through $10 on my AdSense. Had Yaro Starak comment on my Blog. And we’ve been trying to sleep train Ethan - our 8 month old youngest son - which has been pretty tiring.
Also been doing some labourious research for my Nicolas Darvas website, so should have some more content up there soon.
Related Posts:
Day 20 & 21 - Roundup
Day 4 - Roundup
Day 12 - Roundup
Day 13 & Day 14 - Roundup
Day 7 - Roundup
Test Driven Development
August 24, 2005 on 10:21 pm | In 31 Days to a Better Blog, Geek | 32 CommentsI’m just about to finish reading Test Driven Development: By Example - written by Kent Beck. Well I’m actually due to finish it on the bus to work tomorrow morning, but thought that I would post about it tonight while it is reasonably fresh in my mind.
For those who don’t know - by day I am a Software Developer working on software for the Accounting Practice industry. Just about all of my development work is done using Microsoft VB6 and Microsoft Access - But over the last few months I have been developing using the Microsoft C# programing language and the MS .Net framework.
Up until today, my software testing methods have probably been somewhat un-structured. But after getting through the first two chapters of Test Driven Development: By Example I thought I could try a change. When I got to work I cranked up my PC - and continued to work on something that has been giving me grief for the best part of the previous 1 to 2 days.
However - today I approached the problem armed with NUnit and my newly aquired knowledge of Test Driven Development - and even though the first hour or two was a combined mixture of work and getting myself aquainted with my new methodology - I was astounded to develope a solution for my problem not long after finishing my lunch. And with hardly any swearing or violent thoughts! - and it was pretty much from scratch having binned the previous code because it was getting way too gnarly!
You see, the trick with Test Driven Development is to write the tests first! Which I found a little perplexing when I started reading about it. But by doing this you are breaking down the Complex Bigger Problem into Smaller Achievable Goals. Starting with something that blatantly doesn’t work - and making sure that each goal works fully before moving onto the next.
To me this sounded like a laborious and tiresome activity. And I have to admit that as I progressed through the morning I wasn’t sure that I was actually getting much done. However - suddenly - after lunch - I had a Fully Functioning product of what I had been trying to achieve for the last couple of days!
Now that I’ve had time to dwell on todays experience after writing it down - I’m wondering what else, apart from software development, Test Driven Development could be applied to. I reckon you could probably get quite philosophical about the whole thing.
Anyway, I’m going to have to try and get some kind of TDD system set up for my VB6 development environment - because I think I’m going to miss it.
And thanks to Maruis Marais for the lend of the book.
Related Posts:
15 Rules to Better Code
10 Stupid Mistakes Made by the Newly Self-Employed
Less Traffic Today :(
Leech FTP
The Power of Blogging
Blogs Today
August 24, 2005 on 8:50 pm | In 31 Days to a Better Blog, Blogging | 1 CommentToday, there was a comment on my Online Business post from Yaro Starak.
If you are wondering who Yaro Starak is - he is one of the guys behing the Venturus Website - and therefore is one of my (self appointed) Blogging Mentors. So, I’m feeling pretty chuffed that he has come and placed a comment on my Blog.
However, I’m also feeling a bit peeved that his Blog has currently knocked my Blog of my record high ranking of 15 over at TobBlogSites!!!
Anyway, from the comment that Yaro posted, I found that he has a Personal Blog which has a lot of detail about the online businesses he has set up and been involved in. It also has some interesting articles on SEO, Business, and Blogging (amongst other things).
He has posted about Getting Things Done in Your Internet Business which has some good advice about Time Management, Motivation, and Life Balance when you are self employed.
If you find yourself wandering over to his Blog - Entrepreneurs Journey - be sure to check out his Articles section.
Related Posts:
More on Seth Godin
Day 5 - Roundup
Performancing Metrics
The Power of Blogging
Links
Blog Rating - Increase Your Blogging Confidence
August 23, 2005 on 9:16 pm | In 31 Days to a Better Blog, Blogging | No CommentsFive days ago, I posted about signing up with a website called BlogTopSites. This site is a directory of Blog Websites which are ranked in category by the amount of unique visitors that they get - they say - “Ranking of pages is done according to the number of unique visits each blog receives every week”.
I have to admit that the reason I originally signed up for this site was because I had seen them on ProBlogger and Trader Mikes Blogs - and I had been signing up with other Blog Networks such as NewsGator, FeedBurner and Pluck as I had read that they are a good way of increasing your Blog traffic.
The best thing about BlogTopSites is that my ranking has been climbing steadily - which is a huge boost to my confidence that I might be Blogging Right. I have also found some other cool blogs that are above and beneath my ranking - such as Work Online from Home - How I did it - written by a fellow Kiwi.
Another great thing is that if you zoom up to the top of the list - you can check out how the experienced Bloggers do it - These are the guys who are getting the big hits - Learn from them and hopefuly move up the list.
Related Posts:
Web Stats
Day 18 - Roundup
favicon.ico - Typo
Michael Cheneys AdSense Videos
Link Building - An Open Invitation
Adsense Tweaks
August 22, 2005 on 9:54 pm | In 31 Days to a Better Blog, AdSense, Blog Housekeeping, Blogging | No CommentsI have been mentioning for a few days that I have been spending some time Tweaking the AdSense that appears here and on my Nicolas Darvas Website.
One of the biggest tasks was placing an 250 x 250 AdSense Box that appeared in just the first post of a displayed web page. If anyone is inerested in doing this themselves, then here is a brief description of how I did it.
The most important thing was to hack the index.php file in the current theme. What I needed to achieve was to insert the AdSense box into only the first post and not any of the subsequent ones.
So, to achieve this, I had to put a counter variable at the begining of the index.php file - I hope it doesn’t get too geeky!:
< ?php $showAdSense = True; ?>
Next, I had to scroll down through index.php to find the start of the <div> tag which handles the style for each post - In my current Theme, it is:
<div class=”entry”>
Once I had found this, I pasted my AdSense code immediately before it - with some PHP and a style wrapped around it - The PHP made sure only one block would be displayed and the style would place it in the right area of the post. Here is the code:
<?php If ($showAdSense) { ?>
<div style=”float: right; margin: 0px; margin-top: 10px; padding-right: 0px; padding-left: 5px”>
<script type=”text/javascript”><!–
google_ad_client = “pub-XXXXXXXXXXXXXXXX”;
google_ad_width = 250;
google_ad_height = 250;
google_ad_format = “250×250_as”;
google_ad_type = “text”;
google_ad_channel =”";
google_color_border = “FFFFFF”;
google_color_bg = “FFFFFF”;
google_color_link = “CC6600″;
google_color_url = “6699CC”;
google_color_text = “000000″;
//–></script>
<script type=”text/javascript”
src=”http://pagead2.googlesyndication.com/pagead/show_ads.js”>
</script>
</div>
<?php $showAdSense = False;} ?>
Basically, the first line of this code asks is there an AdSense Box here?. Because the showAdSense variable is set to True - then the answer to this question is Yes - so, the AdSense code is inserted into the HTML for the page.
At the end of the AdSense insertion, there is a piece of PHP code that then sets the showAdSense variable to False - so that the when it comes to insert the next post and the page asks if there is an AdSense box - the answer will be No.
And that - believe it or not - is all there is to it. Of course don’t be fooled by how easy it is - Remember to ALWAYS back-up any files you are working on when Hacking your Blogging Software. I know from bitter experience the pain of trying to unpick crappy code because you can’t restore to the original version.
Oh - and I’ve inserted all those XXXXXXXX’s in the AdSense block where my AdSense ID goes. If you would really like to show my ads on your pages - please let me know as I’ll be only to happy to oblige!
Related Posts:
3.28767 is the first Google AdSense Magic Number
Michael Cheneys AdSense Videos (Update)
Michael Cheneys AdSense Videos
AdSenseLog - Desktop AdSense Account Application
Chitika eMiniMalls
Day 20 & 21 - Roundup
August 22, 2005 on 12:52 pm | In 31 Days to a Better Blog, Blogging | No CommentsAhem… I realised that I didn’t post a Roundup for these two days. Another family oriented weekend I’m afraid.
What I have been doing over the weekend though is:
- Adsense Tweaking - An interesting experience. I feel like I’m beginig to get to grips with this now.
- More Research - for my Nicolas Darvas website. This is proving to be quite time consuming. But then, things take time.
I also noticed that I had my first Amazon Affiliate sale last week - which was a cause for minor celibration.
Related Posts:
Day 7 - Roundup
Day 15 - Roundup
Day 9 - Roundup
Day 16 - Roundup
Day 13 & Day 14 - Roundup
Pool theme design by Borja Fernandez.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^








