Here's a post I found today that is just awesome.
It reads almost like a poem.
Leave
Pat Pack
.Net and gaming randomness
4.10.10
18.8.10
Using .Net usings...
In .Net to make use of other namespaces (libraries of classes) you do so by the 'using' keyword. On the other hand you can fully qualify the namespace if you wish to avoid including 'using' methodology. Whatever the case this isn't a lesson on the using keyword.
The real point of this post is to attempt a practical ordering included namespaces for all classes. The pattern I'm suggesting (hell, maybe it's even actual recommendation already?) is the following:
(Core namespaces)
(Your [company/project/school] namespace)
(3rd Party namespace)
Essentially giving organization to something that is usually a mess.
Lets take a peek at an example.
Look at this mess, no order, its not immediately obvious which 3rd party components are being used.
Now using my suggestion:
Doesn't that look better? It gets across everything immediately and in an standard fashion.
Oh also, always always always get rid of unused namespaces. More clutter to junk up your files.
Quick easy fashion to do this. Right click on your class definition -> Organize Usings -> Remove and Sort. Now there is no excuse to have unordered, non-used namespaces in your files, and its built in.
The real point of this post is to attempt a practical ordering included namespaces for all classes. The pattern I'm suggesting (hell, maybe it's even actual recommendation already?) is the following:
(Core namespaces)
(Your [company/project/school] namespace)
(3rd Party namespace)
Essentially giving organization to something that is usually a mess.
Lets take a peek at an example.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.IO;
using Dundas.Charting.WebControl;
using MyCompany.Core.Framework;
using MyCompany.Core.Utils;
using MyCompany.Project.Common.Analytics;
using MyCompany.Project.Common.Utils;
using MyCompany.Project.Core.Emissary;
Look at this mess, no order, its not immediately obvious which 3rd party components are being used.
Now using my suggestion:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.IO;
using MyCompany.Core.Framework;
using MyCompany.Core.Utils;
using MyCompany.Project.Common.Analytics;
using MyCompany.Project.Common.Utils;
using MyCompany.Project.Core.Emissary;
using Dundas.Charting.WebControl;
Doesn't that look better? It gets across everything immediately and in an standard fashion.
Oh also, always always always get rid of unused namespaces. More clutter to junk up your files.
Quick easy fashion to do this. Right click on your class definition -> Organize Usings -> Remove and Sort. Now there is no excuse to have unordered, non-used namespaces in your files, and its built in.
29.4.10
Unknown Windows shortcuts
Most keyboards these days have the Microsoft logo'ed Windows key. This key is simply magic.
For example hold that key down and tap the 'E' key.
My computer just pops up, bam! Navigate away.
Windows key + 'R' : The run prompt shows up ready to do your bidding.
Couple this with the different service consoles or applications (services.msc or notepad++ for example) and you are just getting around without even taking your hands off the keyboard.
Windows key + 'D' : Minimize all visible applications, OR re-display visible applications as their previous display. Try it, its amazing.
Most of these are known and used everyday, however there are a few people I show are still wowed by. And recently Lifehacker posted some Windows 7 tips that wowed me.
If you're using Windows 7 with multiple monitors you just have to use these.
Windows + Up Arrow = Maximizes active window
Windows + Down Arrow = Un-maximizes active full screened window OR minimizes active windowed application.
Windows + Left (or Right) Arrow = Cycles window in direction of arrow key across monitors. Amazing!
I've been loving this since I learned about it, just changes everything!
For example hold that key down and tap the 'E' key.
My computer just pops up, bam! Navigate away.
Windows key + 'R' : The run prompt shows up ready to do your bidding.
Couple this with the different service consoles or applications (services.msc or notepad++ for example) and you are just getting around without even taking your hands off the keyboard.
Windows key + 'D' : Minimize all visible applications, OR re-display visible applications as their previous display. Try it, its amazing.
Most of these are known and used everyday, however there are a few people I show are still wowed by. And recently Lifehacker posted some Windows 7 tips that wowed me.
If you're using Windows 7 with multiple monitors you just have to use these.
Windows + Up Arrow = Maximizes active window
Windows + Down Arrow = Un-maximizes active full screened window OR minimizes active windowed application.
Windows + Left (or Right) Arrow = Cycles window in direction of arrow key across monitors. Amazing!
I've been loving this since I learned about it, just changes everything!
26.4.10
Lull point
I've not posted in so long, my massive audience has now probably stopped following. Sorry loyal followers!
I must admit, I feel I just don't offer enough as a developer to post compared to other avid/interesting bloggers. And as of recently I've been in a development lull.
No interesting discoveries, no new tools I've dabbled with, nothing really.
Recent work has changed from a News harvester to a rewrite of a very high traffic site.
While it is exciting/new/challenging, I'm just tanking in enthusiasm.
Ah well, pity me huh?
Recent things I can blurb about:
-Read Don't Make Me Think: A Common Sense Approach to Web Usability, 2nd Edition
By Steve Krug.
Thoughts: Very easy read and sensible book on usability. Life changing? No, but sometimes I think you need to get smacked in the face with obviousness to realize things. For example the chapter on web usability I found really informative.
-Going to Spain! As we try to do every few years, we are getting out of the U.S. for a duet of weeks to see exactly what Spain is about. Very excited about this, and the excitement is growing as the days counting continue downward.
That's about all I can dump off the mind at the moment. I believe it is a glimpse at my lull.
Ah well.... as Johnny Cash said, Drive on...
I must admit, I feel I just don't offer enough as a developer to post compared to other avid/interesting bloggers. And as of recently I've been in a development lull.
No interesting discoveries, no new tools I've dabbled with, nothing really.
Recent work has changed from a News harvester to a rewrite of a very high traffic site.
While it is exciting/new/challenging, I'm just tanking in enthusiasm.
Ah well, pity me huh?
Recent things I can blurb about:
-Read Don't Make Me Think: A Common Sense Approach to Web Usability, 2nd Edition
Thoughts: Very easy read and sensible book on usability. Life changing? No, but sometimes I think you need to get smacked in the face with obviousness to realize things. For example the chapter on web usability I found really informative.
-Going to Spain! As we try to do every few years, we are getting out of the U.S. for a duet of weeks to see exactly what Spain is about. Very excited about this, and the excitement is growing as the days counting continue downward.
That's about all I can dump off the mind at the moment. I believe it is a glimpse at my lull.
Ah well.... as Johnny Cash said, Drive on...
21.1.10
Dear Microsoft
Ever since I was a gaming noob or programming wanna-be (I guess I still am this though) I've been interested in computing ergonomics. Ergo mouse, ergo keyboard, ergo desk, ergo monitor configuration etc. While this puts me out as the dude at work with the weird setup, it is surprising to see how many career developers don't even consider it. The risks are real.
I currently use the Microsoft Natural Ergonomic Keyboard 4000+ v1.0

This is a great keyboard. Honestly...
But there is one thing that I can totally do without. Take a gander at that gigantic number and arrow pad section. It's basically 1/3 of the keyboard in total. Imagine an ergonomic style keyboard (with wavy keys) without a number pad. This gigantic number pad requires me to move my right arm an additional 8ish inches to the right causing some discomfort after long periods of use. Now when I'm whipping out design elements on a windows form dragging and dropping things all over; the additional mobility cost spent to rename default name properties is fatiguing.
I imagine what it would be like to have my keyboard not off set from the front of me or my mouse in an ideal location. The first keyboard maker that comes out with this will have real market for this. With the continued research into repetitive stress injury and computer related injuries (I realize that sounds crazy) will come the increased knowledge and want for extremely ergo items.
I currently use the Microsoft Natural Ergonomic Keyboard 4000+ v1.0

This is a great keyboard. Honestly...
But there is one thing that I can totally do without. Take a gander at that gigantic number and arrow pad section. It's basically 1/3 of the keyboard in total. Imagine an ergonomic style keyboard (with wavy keys) without a number pad. This gigantic number pad requires me to move my right arm an additional 8ish inches to the right causing some discomfort after long periods of use. Now when I'm whipping out design elements on a windows form dragging and dropping things all over; the additional mobility cost spent to rename default name properties is fatiguing.
I imagine what it would be like to have my keyboard not off set from the front of me or my mouse in an ideal location. The first keyboard maker that comes out with this will have real market for this. With the continued research into repetitive stress injury and computer related injuries (I realize that sounds crazy) will come the increased knowledge and want for extremely ergo items.
10.1.10
Netbooks - Should you or not?
In a recent post on one of my all time favorite blogs, Jeff Atwood discusses another bloggers thoughts on the netbook. This kind of fired me up reading why this Joey DeVilla is knocking the netbook. Let me explain.
In August, as a graduation gift I purchased a Acer Aspire One A150 for my newly Masters educated honey bunny. I bought it on after seeing her destroy my old Dell Inspiron 5100 throughout her school. It was sort of a whim, sort of to stay current on today's technology. But after a solid 3 month use cycle, I know this netbook has changed our computing lives.
First a few changes that as a result of this purchase/gift:
1- We have a laptop with us anywhere we go.
Explanation- With the light weight (3 pounds) and size, the Aspire One fits in any purse/book bag we bring when traveling. Also it does not choke out my shoulders when its in my bag. Also in flight it fits every so nicely on the super small tray, right next to your built in cup holder for a movie or coding on the go.
2- While at home the netbook is always on, and unplugged.
Explanation- The battery life on this netbook has impressed the heck out of me and continues each time. We can stream 3-4 Netflix movies and still have juice for random browsing/playing in flight. My old Inspiron would last maybe an hour just browsing a flash based site. About to go to library on Saturday, pop that bad boy out of sleep mode and look it up in 2 shakes.
3- It has withstood my girlfriends abuse.
Explanation- Well to put it bluntly my lady abuses the laptops. My Inspiron had a screen dangling from one hinge that did not stand up unless you propped it on something, see pics below. It was dropped daily, had various liquids spilled within it, and amazingly still turns on and displays. Mind you I have had to disassemble both the old and new netbook numerous times to 'fix' any issues these problems have caused. But the Aspire One is still holding strong. In fact there are no scratches on its beautiful case or screen. They keyboard pops out with no screw driver necessary for easy cleaning, and totally disassembling takes maybe 15 minutes. Super maintainable.


This purchase has now made my girlie a more online monster than I am now. I wake up this morning, walk out to the living room to find her on the netbook researching flights for our yearly vacation, all while having a newspaper in her lap and eating bowl of cereal. She brings the netbook with her everywhere but happy hours and uses it as her work machine.
Now some guys or large handed lady's may seem adverse to the small nature of the netbook. I will offer this advice/knowledge, its fine. While the keys are in a tighter area, I have not encountered any issues writing emails/code with the same speed as a normal sized keyboard. Try it at a local Radio Shack (The Shack?) or other computer retailer. It is fascinating.
My only complaint is the mouse buttons are a bit too demanding on how hard you push to register a click. Its better to use the tap functionality of the touch pad.
All in all, for $350 one of the best purchases I've made and one of the most used gifts I've given.
I recommend this particular netbook to anyone wanting a truly portable awesome device.
In August, as a graduation gift I purchased a Acer Aspire One A150 for my newly Masters educated honey bunny. I bought it on after seeing her destroy my old Dell Inspiron 5100 throughout her school. It was sort of a whim, sort of to stay current on today's technology. But after a solid 3 month use cycle, I know this netbook has changed our computing lives.
First a few changes that as a result of this purchase/gift:
1- We have a laptop with us anywhere we go.
Explanation- With the light weight (3 pounds) and size, the Aspire One fits in any purse/book bag we bring when traveling. Also it does not choke out my shoulders when its in my bag. Also in flight it fits every so nicely on the super small tray, right next to your built in cup holder for a movie or coding on the go.
2- While at home the netbook is always on, and unplugged.
Explanation- The battery life on this netbook has impressed the heck out of me and continues each time. We can stream 3-4 Netflix movies and still have juice for random browsing/playing in flight. My old Inspiron would last maybe an hour just browsing a flash based site. About to go to library on Saturday, pop that bad boy out of sleep mode and look it up in 2 shakes.
3- It has withstood my girlfriends abuse.
Explanation- Well to put it bluntly my lady abuses the laptops. My Inspiron had a screen dangling from one hinge that did not stand up unless you propped it on something, see pics below. It was dropped daily, had various liquids spilled within it, and amazingly still turns on and displays. Mind you I have had to disassemble both the old and new netbook numerous times to 'fix' any issues these problems have caused. But the Aspire One is still holding strong. In fact there are no scratches on its beautiful case or screen. They keyboard pops out with no screw driver necessary for easy cleaning, and totally disassembling takes maybe 15 minutes. Super maintainable.
This purchase has now made my girlie a more online monster than I am now. I wake up this morning, walk out to the living room to find her on the netbook researching flights for our yearly vacation, all while having a newspaper in her lap and eating bowl of cereal. She brings the netbook with her everywhere but happy hours and uses it as her work machine.
Now some guys or large handed lady's may seem adverse to the small nature of the netbook. I will offer this advice/knowledge, its fine. While the keys are in a tighter area, I have not encountered any issues writing emails/code with the same speed as a normal sized keyboard. Try it at a local Radio Shack (The Shack?) or other computer retailer. It is fascinating.
My only complaint is the mouse buttons are a bit too demanding on how hard you push to register a click. Its better to use the tap functionality of the touch pad.
All in all, for $350 one of the best purchases I've made and one of the most used gifts I've given.
I recommend this particular netbook to anyone wanting a truly portable awesome device.
Subscribe to:
Posts (Atom)