Punk-coder Blog

Tools for Visual Studio

by on Feb.09, 2012, under Uncategorized

I love Visual Studio, which is kind of convenient since its where I spend most of my time, and one of the features that I like the most about it is the amount of customizing and plug ins that are available.  So I thought that I would go through and cover a few of the items to help others learn from the productivity hacks that I have found.

Customizing

The first thing that I change with any install of visual studio is the color scheme.  I’ve found that personally staring at a white background for long amounts of time leads to me having a burn in effect. After a couple of hours I find that it’s hard to focus because my eyes are tired and kind of burn.  It use to be that to change the color scheme in visual studio you had to go through and change all of them manually then export your settings.  Now there is a nice web site that keeps a good collection of them and allows you to export them for a particular version of visual studio. I personally prefer the ‘Desert Nights’ theme.

Website: http://studiostyl.es/

Plug-ins

CodeRush and Refactor!Pro

These two plugins are responsible for a productivity leap that would be difficult to explain without demonstrating what they do.  There is a version of called xpress for trying it out, but you won’t understand how fast you can be without downloading the trial.  I don’t get extended benefits any more since my transfer to ATS, I buy this one out of pocket.  I consider it an investment in my free time.

Website: http://devexpress.com/Products/Visual_Studio_Add-in/Coding_Assistance/

VisualHG

Source control is a must. Even if I am writing only a few lines of code, when I don’t have access to TFS, mercurial is my choice of source controls.

Website: http://visualhg.codeplex.com/

NuGet

Package management made painfully simple. Makes adding 3rd party libraries as simple as adding references,  also includes the ability to integrate project specific repositories.

Website: http://nuget.org/

GhostDoc

Helps you quickly build out documentation if you use human readable code.

Website: http://submain.com/products/ghostdoc.aspx

 

1 Comment more...

I Love my Mac… but,

by on Feb.09, 2012, under Uncategorized

So let me start by saying that I love my mac.  I own two of them and there are a great many things that mac does so well that others really can’t touch.  But, before you tune me out let me state very clearly that I am not a fan boy. Here’s why…

So for the last couple of years I have been working as a .net developer.  It wasn’t where I originally saw my self, I loved linux and I loved the power of the console.  To this day I still install cygwin and force the prompt to green on black, but something happened in the last couple of years.  That’s part of what I want to dig into in this post be warned I don’t have a particular direction for this so it could go everywhere.

The first thing that I wanted to use my mac for was development.  After all thats what I do for a living, this is where I hit my first snag.  I tried using xcode, I have studied many programming languages and to this day write code in c++ and dabble in ruby.  I found objective c so terse that I couldn’t continue.  So I looked for alternatives to programming in x code… there really weren’t any that I found. Directly following this I went looking for cross platform solutions for developing on mac. This lead to more heartbreak.

In the end I was able to figure out what my problem was, and I honestly believe this.  Mac’s are designed for users, not developers.  The IDEs seem to be very primitive and the languages for developing native code seem backwards, part of this I know is bias because I know C# and because I know C# I am inclined to use it as a bar to hold other applications to.  But after getting accoustomed to working with visual studio, which covers 90% of the functionality that a developer would need and the plug in support for it is astounding.  I couldn’t live without CodeRush…

The final part of this quasi rant is that I would like to have my eyes opened, are there any really good tutorials for developing applications on the mac using xcode or any other IDE… If so I would love to hear about them.  Do CodeRush type applications exist to make coding objective c more palatable?

For the meantime it looks like I will be going back to working with mono.

James

Leave a Comment more...

Migrating the Website

by on Dec.23, 2011, under Technology

I have migrated away from Godaddy in light of their stance on SOPA, for more information check the link below.

http://support.godaddy.com/godaddy/go-daddys-position-on-sopa/

if you don’t know anything about SOPA or why it’s evil, here is an excellent explanation of ProtectIP and SOPA… Click Here

Leave a Comment more...

Managing offshore work.

by on Dec.21, 2011, under Things I Wish I Learned in College

“Many hands make light work.” – Origin Unknown

“This statement is false” – Liars Paradox

There is an excellent lesson to be learned in working with others, and even greater lesson when working with people of a different culture. As you should be learning to spot business speak, you can tell that this ended horribly.  Otherwise there wouldn’t be a lesson involved.

So I landed at my clients office for the first time and I was settling down into my new desk, the project manager came in and talked with me about the project. The project was simple for the most part there were a couple of office documents that would need to be automated.  They needed to be tied up to a database so that the information could be reused across the departments.  To me this sounded like it shouldn’t be a problem.  I had done things like this before so there shouldn’t be anything difficult about it.  I was also informed that we had a very short deadline to work against but that this would be alleviated by adding two resources from off shore.

Enter Alice and Bob (not their real names).

So as we started, the management figured out that source control was too expensive so there was no budget for that, and that we were to transfer code from the US to offshore by email (Mistake #1, cost is never an excuse for not using source control).  In the beginning this was not a problem I would make my code changes during the day then would ship the offshore team our project by email, then they would return their updates from over night and I would review and integrate their changes.  This worked for about the first week then there were a couple of days where emails had gotten kicked back.  The resulting of this was that I had to spend a full day reviewing one set of changes and review the second set another day.

Bobs code for the most part looked good but childish, like someone who had never really programed in C# before. Alice’s code often contained compiler errors and required reworking to even be functional, a topic that we talked about on several occasions.  However since they were on lend from another department I couldn’t get them removed and I had to work through their work (Mistake #2, if someone is creating a hindrance and your direct management won’t solve the problem. Find some one who will). It finally go to the point where I was spending 8 hours working with their code and another 8 hours working on mine.  Then came the point where the real problem crept in.

Knowing that I had to have certain elements of the code that needed to function and work by a certain date I started cutting back the time that I was spending reviewing the code, switching it from working 4 hours on their code and 12 on the code that I was responsible for. (Mistake #3, don’t leave children alone in the garden).  Because of this code that contained inherent bugs started slipping into the code and there were hacks to fix the hacks in the hopes that this would eventually get to a point where the code was functional.

It never got there,  in the end I had a client that was upset with me.  A team that was upset with me, and I loathed being in that situation. The project completed from my side about a month and a half after it was planned to, and it counts as one of the black marks in an otherwise good year.  I’m offering this up as a cautionary tale about the lessons I learned in the hopes that others won’t have to experience them.

Leave a Comment more...

Encryptr

by on Dec.20, 2011, under Code

I had been fooling around with this idea for a long time, and I finally sat down and coded it.  The idea is simple, in the world of secret sharing you want to ensure that the fewest number of people have what is needed to expose the secret.  The problem is that in many cases when you hand over that information to a service or escrow you  have no idea if they are really keeping that infromation secure.  Classic example is that if you send email from one person to another the email, even though it may be sent across the wire using ssl, is more than likely sitting on the server in plain text. Even if it isn’t there are ways for the administrator to expose the contents of the email box.  So how do you pass a message and make sure that everything is secure.

You encrypt it on one end and decrypt it on the other end, without storing anything but the encrypted text on the server.  That’s what encryptr does.  It takes a message typed in by the user and encrypts it using javascript then sends only the encrypted information to the server. The only part of the message that is identifiable in the server is the id which is used to look up the message.

If you are interested in the project feel free to got to https://bitbucket.org/punkcoder/punkcoder.applications.encryptr

Leave a Comment more...

No. No. No. No. No.

by on Dec.02, 2011, under Uncategorized

It happens every once and a while.  You see it and to the untrained eye you just glance over it, but if you are in the know it should stop you in your tracks.

GC.Collect();

Once upon a time when the garbage collector was new to java and .net there were a group of people who thought that they were smarter than the people who implemented these system.  They thought that they could find the best place to force garbage collection.  At the time they may have been right. But advance the clock, because as we know code is never complete only abandoned, ten years into the future and I see that there is this section of code that is being called as part of a loop.  It stopped me in my tracks,  to realized that there was once a hack put in place to clear up an issue, and now since we have moved ten years into the future it is more than likely the code that is causing the massive slowdown and the reason that I am looking at the code.

I think there is a lesson to be learned here.

Leave a Comment more...

Things I Wish I Learned in College: Someone will be reading your code…

by on Jun.24, 2011, under Code, Technology

I came across this the other day in a piece of forgotten code. If you have been in programming for any period of time then you surely have seen it. Its the ‘well documented hack’ for example:

//This Item was created per the client
//Instructions to correct a legacy issue
// ...
//Do not delete this method

I know people who have written those lines of code,  as I am sure that there are some people out there that continue to write lines like this.  But I want to take a moment and think about this,  is this the type of code that has a place in your product?  This is the essence of hacked code.  In my current line of work I find code like this alot, programs and methods that have gained so much dust that the people who wrote them are no longer around to ask why they were important.

Which brings us to the point of all of this,  at what point to you attempt to fix the issues of time that has gone past?  How do you turn around a program rifled with code rot, and in the end is it really worth it? Many cases the applications that contain this type of code have millions upon millions of lines of code.  The only way to make certain that you don’t land yourself in this spot is to always approach code with the thought that someone forty or more years down the line will be reading your code. They will look at your prized application and they will not see the bleeding edge technology that you saw when you designed it.  They will see the hulking and aged behemoth that remains, they will look at it with very different eyes.  The only gift that you can give to that person is code that is clear, clean, and easy to read.

If you see a hack replace it with the corrected code, and don’t write any more hackish code. If you are intent on making software your craft, learn it, and exercise it to the best of your ability.

Leave a Comment :, , , , , more...


Stupid Developer Tricks : Proxy Settings

by on Dec.10, 2010, under Technology

Not too long ago I found myself working on multiple projects that had me switching back and forth between multiple different proxy settings based on the fact that I was working from either of the locations or working from the hotel room. They get to the point where setting all of the proxy settings every time I needed to open one of my browser’s was starting to drive me slightly batty. So I did what all of developers do I looked into what it would take to automate the process of setting my proxy settings, and I came up with this little script that I thought I would share:

Write-Host "Proxy Configuration Script"
Write-Host "  Select your proxy settings: "
Write-Host "   "
Write-Host " 1.> Proxy Off  "
Write-Host " 2.> Work  "
Write-Host " 3.> Hotel     "
Write-Host "   "
$selection = Read-Host "Selection"

if ($selection -eq "1")
{
	set-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyEnable -value 0
	set-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name AutoConfigURL -value ""
	set-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyServer -value ""
}

if ($selection -eq "2")
{
	set-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyEnable -value 0
	set-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name AutoConfigURL -value "http://<YourCompaniesAutoConfig>"
	set-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyServer -value ""
}

if ($selection -eq "3")
{
	set-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyEnable -value 1
	set-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name AutoConfigURL -value ""
	set-itemproperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings' -name ProxyServer -value "<Your Companies HardCodedServer:port>"
}
1 Comment more...

Review: Applied Architecture Patterns on the Microsoft Platform

by on Dec.10, 2010, under Technology

When I found out that Stephen Thomas was writing a book about the upcoming technologies with some of the experts in these technologies, I immediately thought to myself I need to read this book.  So after getting my hands on a copy of Applied Architecture Patterns on the Microsoft Platform I found myself with both some interesting reading material as well as a crash course on some of the architectural designs for upcoming and current Microsoft technology.

To start off I make my living as a software consultant and I pride myself on my knowledge of many areas of technology, currently in the Microsoft stack.  Because of this I think my view of the book has been slightly skewed, to further complicate things I also view myself as an early adopter oftentimes tinkering with the latest CTP of the developer tools for various new products.

The book starts by going across the architectural overview that attempts to set down the parameters for what the rest of the book is built against.  This section of the book is reserved for the youngest among the developer an architect crowd, and I would imagine would be the most skipped out of all the chapters.

The next section of the book deals with primers for each of the different technologies that they are working with including windows communication foundation and workflow foundation, app fabric, biz talk, SQL server (SSIS and SSSB) , and windows azure.  These particular chapters I found to be of little help, simply because I keep up with many of the technologies.  However if you are walking into a situation where you know nothing about these technologies, then you might find the primer chapters useful.

The next section of the book consists of problems that were picked so that they would meet the needs of the examples.  But while this is not an uncommon practice in the realm of technology education literature, it is slightly frustrating and let me to wonder exactly how well these technologies would perform under real-world circumstances.  The most informative part of the sections includes the side by side comparison of multiple solutions and the bare information provided to develop quick skills with the particular technologies.  In many cases I think the book would be useful in the instance that you needed to have a crash course on one of the technologies that was presented.

On the other hand there are some chapters in the book that deal with very specific instances of solving real issues that occur when working with the toolset.  At least one of the chapters in the book deals specifically with an issue that I have encountered before and stepping through the pages for that particular chapter were in many ways like reliving that assignment complete with the solution.

But in the end I don’t think most people will read the book the same way I did from cover to cover, and it may not be a great reference for someone looking to update their skills in a particular area.  However if you have been out of touch with the latest offerings from the Microsoft stack for more than two years you may find this book extremely helpful as it gives step by step instructions that will act as an introduction too much broader discussions.

In the end the book is a blend of content ranging from very specific instances that function more like a recipe than a tutorial to broad overviews of the technology.  I think that there is a little something for all architects and developers to pull out from this book, and the format allows you to pull out a specific portion of knowledge and digest it without having to go through the entire book.  In this way it represents more of a collection of loosely connected detailed articles than a tome of technical knowledge.  In the end I was not upset with the amount of time spent reading the materials.  I think much of the information that I gained I will be able to put to good use.

Pick up your copy at Packt Pub.

Leave a Comment :, , , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...