Archive for Rants

The web must die

Aug 1

I hate hate hate web development and for some reason I do it all day and night. Maybe I do it so others don’t have too. I am such a hero.

The reason I hate it is that it was never meant to do what we are doing with it now. The sheer amount of technology introduced to accomplish such a simple thing as showing someones email inbox takes thousands of lines of code and multiple technologies. I know that I have been on projects that get extended way past there initial design (the current app of 3 years I am working on started as a 4 month project). But there came a point where we stopped and said that the app was stretched to far and needed to revise the way we structured some of the app/database to allow it to expand. Unfortunately I don’t ever see this happening with the web unless smart clients take off huge and can run on any platform with zero issues.

To that end here is my technology required list for developing an average website vs. windows app

Web Development Windows Development
HTML
Javascript
asp.net
CSS
Working in a stateless environment
Browser & Resolution compatibility
Cookies (thankfully we don’t have to use cookies that often anymore)
Accessability
Xhtml
Search engine optimization (on sites that are public)
Deployment (usually means how to use FTP)
Managing session timeouts
Security
Ajax / Atlas / whatever
a .NET language
Security
deployment knowledge (i.e. build an msi or xcopy)
Resolution compatibility

Filed Under: Rants

Looking toward the future

Jun 7

I recently attended the Calgary Code Camp and had a few insights into the future of our world.

I feel that the need to specialize is comming. As much as I hate specialization as it can make you obsolete pretty quickly (i.e. foxpro specialists are few and far between). I know asp, vb, c#, javascript, sql2000, reporting services, crystal, access, php, networking, and a whole bunch of other stuff. I find that I use a lot of these skills on a regular basis but it is harder and harder to keep up to speed. I feel that I don’t know enough about programming even though that is what I do all day. Technology has reached the speed that my legs can not keep up to. I feel that having to narrow your skillset is the only way to be an effective programmer and still have a life.

At the camp I saw a presentation of the Windows Presentation Foundation (or WPF). WPF is cool in that it allows you to write an interface using an xml markup language and has a seperation of ui and code behind like the web does. You can also do flash like animations with a timeline and render 3D objects. While this has a big wow factor I feel that it will not be used that much. For one we are always under a time crunch as developers and making a pretty animated interface is not high on our priorities. Business users want a fast application that they are not sitting there watching the pretty animations that loads data. Sure at first it is cool but the novelty wears off pretty quick. The xml scripting language is a pain as now I have to learn another language to design the UI and it seems that the naming is different than html / css naming too so I am going to have to learn to use back-color instead of backgroundcolor or something like that. Overall I think that we will see some nice looking apps but wont have time to build them ourselves.

I like Christies comment of needing a pause button for life.

Filed Under: Rants

Interesting Switch

Jun 1

I have been a fan of Nunit for a while now but recently I have noticed that I never open my UI project on my application. If I add new functionality I write a test case for it to ensure that it works. When I change something internally I run Nunit. I guess I am just amazed at how smoothly it has transitioned to this since I hav added a wack load of test coverage to my project.

One of the cool things just happened now and inspired me to write this post. I am refactoring some redundant tables and stored procs out of my database and I just renamed a bunch of methods and ran my tests expecting them all to fail. To my supprise one did not as I left the stored proc in the database. So that caught one mistake. I then refactored my code to use the new proc and expected them all to pass but again one failed (I forgot that one object has ‘special needs’ and needs to be inserted differently). This process seemed to repeat over and over with me catching one little thing with my tests. By the end of this refactoring I caught 5-6 items that might have been missed in my hands on testing but caught by the user resulting in 5-6 bug reports.

I know that this is kind of a dumb post for those of you that do unit testing / tdd but for those that don’t I hope that it inspires you to start looking towards a unit testing framework for your applications.

Filed Under: Rants

Vista takes 15GB?

May 20

I just ran the vista upgrade advisor (tells you if you have the requirements to run vista). and was shocked to get this error:

We’re sorry, but your PC cannot currently install and run the core experiences of Windows Vista.
However,
you may be able prepare your computer for Windows Vista by upgrading
your PC hardware. You will need to take the following actions to run
Windows Vista. Additional hard drive storage
15GB free space required (Your computer currently has 3.53 GB)
You will either need to:
a) upgrade your hard drive to increase its capacity, or
b) create additional free space on your existing drive by removing unwanted files.
If
you decide to upgrade your hard drive, we recommend 40GB capacity at
minimum for premium editions of Windows Vista. Contact your PC retailer
to see if an upgrade is available.

Why in the world in an OS 15GB? How many DVD’s is it comming on? Or better yet how many CD’s for the non DVD people.

Filed Under: Rants

Paradigm Shift

May 17

I like to post on
technical things but the state of the industry has really been getting
to me so I thought I would right a post about it.

In summary: Most of us have no clue what we are doing.

I
say this because of my experiences in the past year. I can teach anyone
to code. Its really not that hard to do the basics but to make a large
application is where people stumble (myself included). The reasons for
this is that there is no set way to do things. Everyone has their own
way and this is harmfull. What if every engineer had their own way to
do foundation. We would need tons of unique tools for that foundation,
tons of training for the people pouring the foundation, and tons of
money as every process is unique. I think that this is what happening
in our industry.

Over the past while of reading books like
Refactoring and Patters Of Enterprise Application Architecture by
Martin Fowler, talking with developers, watching webcasts. I see a
whole new way to develop and I have been programming professionaly for
the last 5 years.

As I start using some of these amazing
techniques I can’t be saddend to know that most developers out there
have no clue about these. I have shown the model view presenter pattern
to a fiew developers and they are blown away. I personally can not stop
using it (I built a simple contact submittion form last night using it
just because I like it so much). Interface driven development is the
best thing I have started using lately and is a great way to allow
decoupling of contract and implementation. Honestly I feel like I am
seeing how to program for the first time since I did basic on my apple
II.

This is a new and rapidly changing field. Historically look
at being a gunsmith. It starts that everyone has their own way to
manufacture a firearm from raw materials and it is pretty much how
everyone else is doing it but its slow (i.e. coding in a basic
language) . Then some technology comes out like a metal lathe (i.e.
.NET) and now we can build things in our own custom way but faster. We
have hit the point in the industry that any developer can build
something small quite quickly and reliably but when we need to work
togeather or build a large application most of us are in the dark.

What
we need to do is follow the guns and use the concept of interchangeable
parts and starting to look at how to make our projects work better with
other developers and other projects. Unfortunately I don’t know how to
do this other than having us educate each other and share more in the
community of doing things in better ways.

Filed Under: Rants

Security Rant

May 16

Just a quick note on security while it is in my head

1. Use an accept list instead of a deny list.
i.e. use a regular expression that matches [A-Za-z0-9]
vs. ![/*.()<>\......]

if you miss one character then your validation is useless. The first
validation allows only alphanumeric characters. All else are excluded
by the rule.

Microsoft had this issue with IIS 5 (I beleive) in
that people were exploiting it by using the urlencoded values to do
directory transversal i.e.
www.victim.com/%2c%2c/%2c%2c/%2c%2c/c:\windows\system32\command\cmd.exe
(now that is from memory so don’t shoot me)

If the processor only accepted .. instead of %2c things would have been good

(note
that having %2c is valid so it should have been decoded to a . before
it was validated instead of after but that would ruin my example)

2. Fail closed!
I can not stress this enough. If something goes wrong… shut down! fail! throw a billion exceptions.

My best example is a firewall. If an unexpected action occured in the firewall what should be done:
1. Crash and leave all ports open
2. Crash and close all ports cutting off any legitimate services

Ok
one impacts people connecting but it SHOULD! they will tell you and
then you know there is an issue and you can fix it. By failing open in
this case you might not know for months that your firewall is not
working as no one has complained.

Filed Under: Rants

What are we doing wrong

May 16

I recently had a
rant about us as developers not having a clue what we are doing. I want
to try and narow this down into a few areas that I think need
improvement.

1. Testing. We don’t take a step back and look at
different scenarios. Whenever I develop something it is to do a task
and that is what I test. I never test a method to see how it react when
different data then the scenario is added.

2. UI. I never make
an application useable. Its not because I hate the user but that my
emphasis is on functionality. We almost need to look at the interface
as requiring the most functionality and designing a good clean
interface that is user friendly. I need to start designing programs
thinking that the end user is going to be my grandma or something like
that.

3. Data. My applications are filled with garbage data. I
need to find a better way to put realistic data into my applications.
One thing to be carefull of is copying production data into development
as this may violate privacy laws depending on where you live
(seriously).

4. Load & Concurrency. I barely ever test my
applications in high load situations nor do I test what would happen if
two methods got run at the same time. I ran some tests on one
application and was supprised at the number of deadlocks I got in the
database (then again it might have been my testing tool)

5.
Design. I really think most of us don’t know how to design an
application. We all have different views and opinions (or are lacking
in this department). I think we need to start looking at all the
different ways of doing things and start to reach a concensus.

6.
Client Interaction. I find that the client is not involved enough and
is upset when they don’t get what they asked for. This is one reason I
really like agile for having the client heavily involved in the
development project.

7. Unit Testing. I have found this to be
such a usefull tool / practice. Since I started using it I have found
that the quality of my releases has been higher in that there are few
if any regression bugs and I feel more confident making changes to
existing code. I really think that if you have not tried having unit
tests of some kind in an application that you should.

Filed Under: Rants

Why I Hate oracle

May 15

I unfortunately keep running into places that need to migrate oracle or
I have had the unfortunate responsibility of teaching it. I absolutely
can not stand this product and I have a list why:

1. Cost. what an expensive POS.
2. useless junk. Oracle ships with tons of utilities that will never need to be used
3. Bloated install. Installes several apache instance / services I don’t need
4. GUI = the suck. I have never used such hard management tools
5.
no good query tool. The query tools appear to be wrappers around their
dos sql utility. Its like microsoft word using dos’s edit command for
an engine.
6. TNS Names. The only way to connect to a database is to
setup a tnsnames.ora file that makes a name map to an ip, port, and
service. Pray you dont have a syntax error. Why not just have it so the
client can connect to an IP? It makes no sense and is just another step.
7. Roles are sooo confusing. whats a SysOper, SysDba, normal? why not just have a good permissions model
8. Client size. Just to download the client so that I can connect is 550MB. 550MB! Thats MegaBytes! glad I am not on dialup.
9.
Support. I tried to email them but they don’t have an address on their
site. I tried to call them but because I don’t have some CID number (or
something like that) I can not get through the voice system. I press 0
over and over to get an operator and it just says “Thanks for calling”
and hangs up on me.
10. 80′s style application. The application
takes so long to learn and is so convoluted it reminds me of working on
my Apple IIe (may it rest in peace). The GUI looks like a win 3.1 app
and the steps required to do anything seem to take forever.

Now
I know a lot of this is due to me not knowing a ton about oracle but
software should be intuitive. I have learned the basics of a database
in an afternoon but I have been playing with oracle (very rarely but
still using it here and there) for the past 3 years and I still have no
clue why anyone uses it when there are products out there that are
comparable for a fraction of the price.

My recommendation to
oracle is to keep the engine the same but build some tools that make a
developers life easy. Make the install for both client and server as
minimal as possible and then allow me to choose what I want. Make it
affordable. Modernize the application and interface.

Oh btw
Oracle has had a pretty crappy security record. Just now they released
80 patches for Oracle 10 in their quartly patch cycle. YAY! 80 security
holes in 3 months!

My other issue was Oracle 9i. It was
originally called Oracle 9i Unbreakable as it was sooo secure no one
could hack it. Security Researcher David Litchfield found high risk
security holes in the application days after it was touted as
“Unbreakable”. I could not find a count of security holes in the 9i
database but I know it sure was replaced with Oracle 10 pretty quickly.

Filed Under: Rants

Code Camp Calgary Review

May 9

I decided to make the trip down to Calgary to check out code camp and I thought I would share with everyone.

WinFX – John Bristowe

Was a fairly good presentation about the new things comming out from MS.
Windows
Presentation Foundation – Nice look at the unification of mfc, forms,
directx but a little bit of overkill. I hate the idea of XAML (markups
for forms). Its cool to have 3D apps with animations but not usefull in
the business world. Users want fast, functional, easy. Users have a
hard enough time with their coffee cup holder let alone a 3D animated
interface.

Windows Communication Foundation – Was a quick talk
about the new solution to client-server / ipc communication. I really
like the idea of having all the security of com+, the simplicty of
remoting, the durability of MSMQ, and the open contract base of web
services (plus all the ws-* stuff added in). I wish the presenter would
have had more time to go into it

Windows Workflow Foundation -
Again a short and sweet look at how to do workflow via code. The
soluton MS has is great and is one of those new technologies I am
looking for an excuse to implement. Workflow asically allows you to
open a GUI and do a flowchart of your business process. You can
delegate steps to code, have if/else statements, pauses. Best of all
you can store the state of the workflow to a database and restore it at
a later time.

Conclusion
Great overview of WinFX. Was
exactl what I needed to see what was comming. I would have liked more
technical info on it but time was a factor. I felt the presentation
delivered exactly what i read in the bio on the seminar.

Session #2 AJAX  – Before and After Atlas – Kyle Baley

I
have used AJAX a bit before and wanted to see what MS had come up with
to make it easier. ATLAS for the 2.0 framework is awsome. I think it is
a sweet way to do it and keeps things so easy for the developer. The
presentation was a little slow covering AJAX which I did not like. Then
moved to ATLAS which was cool to see. Then went into the next beta of
ATLAS (I think) and languished and died. The topic could have been
covered a lot quicker I felt. I am sleepy now.

Session #3 – Extending Enterprise Library Using AOP and SOA – A. van der Merwe & F. Downing

I
have heard of AOP but no one seems to know how to do it outside of
theory from what I have read. I thought it would be great but this is
crap. I think they are just trying to sell their products to us. I
really have no idea what is going on and from the bored looks around me
I think no one else does. By then end I saw that AOP was implemented in
their product but not HOW it was implemented.

Session #4 – TDD, Data Injection In The Data Access Layer – Jean-Paul Boodhoo

This is the talk I was looking forward to the most. JP gave a good (but
fast talk) that showed a lot of great ways to keep the layers seperate.
I felt that he went to fast for most people not familiar with things
like model view presenter, mocking, and some of the resharper genreated
code. He said that TDD development has shifted him away from the
debugger as it is faster to write a failing test than to step through
the code. Overall it was a great session that filled in some gaps for me but I worry that it was too fast and too complicated for others.

Session #5 – 20 Cool .NET Tools You Can’t Do Without

Ummm…. yes I can. Most of these items I knew of already and some of them I don’t like.

The ones you should know:
    Reflector, 
    Resharper,
    Nant,
    Nunit,
    Ndoc,
    FxCop
The ones I am going to look into:
    DxCore (a free API that makes creating vs plugins easier)
    PageMethods (I can’t describe it. Check the website)
    Typed Collection Wizard (the name says it all)

The ones I want to live without:
    CodeSmith (code generator)
    CodeRush – Like resharper but w/o refactoring (I just don’t like products I have to pay for I guess)
    Refactor! Pro www.devexpress.com  (supports VB) (again have to pay for)
    SnippetCompiler (Tool that allows you to open a window and run some code…. like the builtin command window in vs)

The Others (mainly ones that do not apply to most peoples situation or are difficult to use / install / configure):
    GhostDoc -  nice tool for creating c# coments. based on naming of methods (apparently does vb and c#)
    TestDriven.NET – test with debugger is nice as it auto attaches to the process (can use ncover if right version is installed)
    WinMerge – file merging tool. Great for source safe merges
    Ncover – Code coverage
    MSBee – addin for Msbuild (vs2005) lets you target a framework i.e. 1.1
    CopySourceAsHtml – nice tool for people that blog
    Ndoc – API documentation generation tool
    NDepend www.ndepend.com shows assembly dependancies (good for deployment and shows usage in other assemblies)

Wrap Up

This is the first code camp I have gone to and there were some interesting talks. I wish that the sessions were a bit longer and a bit more technical in some of them but overall I am happy I made the trip. I was dissapointed in the give aways. There was about 10 books (5 of which were held up in customs), 5 crappy shirts, and 1 copy of dundas charts or reports or something. I like the free concept of a code camp so I guess I should not complain about the crappy give aways. Well time for some Hockey Night in Canada. Should I run around Calgary yelling “Lets go oilers!!!!!” ?

Filed Under: Rants

Dave’s 9 rules of Business

May 7

Here are a few of my rules for business. Some of these don’t apply to programmers but they are observations I wanted to share.

1. Business certificates can make a lot of money.
-For one they are usually gifts to people and either the receiver will not have a use for the item
or else they will loose it. I have no stats to back this up the number of unused gift certs out there must be high.
-The only issue is the cost of implemeting a gift cert program. If the costs are minimal then go for it

2. If a customer is unhappy do whatever you can to make them happy

3.
If a customer wants to leave and you can not make them happy then do
everything you can to get rid of them. If you drag your heals on
releasing them from something then they will complain louder and louder
to not only you but their friends and clients giving you a bad name.

4.
If a customer is constantly unhappy or trying to devalue your service,
get rid of them. Clients that are a pain cost more money and take away
time from keeping your good customers and developing new ones. Also the
stress applied to you and your staff from negative clients is a real
downer. My rule of thumb is if you do not pick up the phone due to the
number on the call display get rid of them.

5. Charge what it is
worth. I have cut my prices for friends and companies that are tight on
cash and have always resented it. If they want a quality project then
they should pay for it. This is why the term is called cutting your own
throat and it is sooo acurate.

6. The first person to a market
with a new idea will always succeed. If you come in second with an idea
then no one will know about you. This is why mcdonalds, IBM, coca-cola
are so well know and have the best sales even though their markets are
ripe with competition. I have no idea why this phenomenon occurs only
that everywhere I look it seems to be true. Basically what I am saying
is that if you are copying someone else you can never expect to usurp
them.

7. If you are working more than 8 hours a day to make ends
meet you are not charging enough. Eventually you will burn out and get
behind. Start charging more. If you only get one contract at double the
price of 2 you will work fewer hours and soon be able to bring on more
staff.

8. Good management knows what is going on. If you have
employees keep in touch with what is going on. Even more so get to know
them. Have them out for a beer after work. If an employee likes there
manager they will be happier, not complain about money, and have
greater job satisfaction. This is a key to employee retainment.

9.
Don’t lie to your client to make them happy. If you tell your customer
a project will be done in a week and takes a month they will be upset.
If you tell them it will take two months and you have it done in a
month then they will be happy they got it so early. If you tell them it
will take four months and it is done in one then they will feel that
you charged them for four months of work but only did one. Lies seem to
compound themselves until finally you have to come clean with your
client. If you tell them bad news as soon as you can they will probably
be a little upset but at least aware. If you tell them their project
failed because of something you discovered 6 months ago you are going
to loose a client.

10. (I know I said there were 9 rules but this one is really important). It is always your fault! If you run a comapany it is your fault that something went wrong. Don’t blame anyone else especially employees. Prevent the issue from happening again. Have your managers realize that it is there fault. Either there was not any process to prevent the issue or something got missed. It is your responsibility to prevent issues.

Filed Under: Rants