Git + Google Code + Windows

Just a quick one here because I'm hoping it will benefit a person or two. I'd like to start by stating I've always been a Windows user. I don't like using Macs and I don't like using *nix. Why? It's just my preference, and I'll leave it at that (I don't have an emotional attachment to Microsoft or anything, I'm just well versed with Windows). Anyway... I was recently trying to get a Google Code page setup for one of the postings I wrote. However, being a Windows user made things pretty difficult. Here's how I solved my problem: Install GitExtensions (I already had this installed, because I use this for everything) Created my google code account and created my project. Changed my google code account permissions to allow my GMail credentials when pushing. You can do that here. Navigate…

0 Comments

Thread vs BackgroundWorker

Background There are two classes available in the .NET framework that sometimes have some confusion around them: The Thread and the BackgroundWorker. They're both used to do some heavy lifting for you on a separate thread of execution (so you can keep on keepin' on), so why do we have two different things to accomplish the same end result   Enter The Thread Class The Thread class is available in the System.Threading namespace. Surprising, right? It's the basic unit for spawning off work to be done. Threads let you provide them with a name, which could be one advantage to using them. A thread can either operate as "background" which means it will be killed when the application exists, or not as background, which will actually keep the application alive until the thread is killed off. An instance of the…

0 Comments

Weekly Article Dump

Weekend Motivation Reading! Here's a collection of things I shared over the week. Lot's of motivation, tips, and leadership pointers! 10 Leadership Nuggets From Nelson Mandela: Some inspiring words to lead by! 5 Public Speaking Tips That'll Prepare You for Any Interview: Several basic interview tips that are related to public speaking. Being better at interviewing never hurt anyone :) A Foolproof Tool for Motivating Your Team (and Yourself): I'm always looking for different approaches to motivate. This article offered a pretty good approach that's worth checking out. Shiny objects: tips for using both sides of your brain: Some tips for boosting creativity, mostly aimed at those that may not be that creative :) Are You Coachable?: An interesting article about being "coachable". The best part, I thought, was addressing whether or not you're actually seeking help or if you're…

0 Comments

How and Why to Avoid Excessive Nesting

Background This probably sounds really nit-picky or OCD, but I think it's an issue worth addressing. Excessive nesting of logic within code can make things nightmarish to read. Even a few of years ago I never thought anything of this. I mean, how much could it really affect someone reading it? He/she must be a complete newb to not be able to read my logic. Fast forward to a co-op placement where this was more closely moderated by my managers, and I began to pay more attention to it... Why? Alright, so all that you know so far about my opinion on this is that excessive nesting bothers me. So far, my mission is accomplished. Everything else is just extra. The first issue with excessive nesting is that it actually makes logic hard to follow. If you're doing code reviews…

0 Comments

How Do You Structure Your Singletons?

Background I'll skip over the discussion about why many people hate singletons (that's a whole separate can of worms, but worth mentioning) because in the end, it's not going to get rid of them. A singleton is a design pattern that ensures only one instance of the singleton object can ever be constructed. Often, singletons are made to be "globally accessible" in an application (although, I'm still not confident that this is actually part of the definition of a singleton). There are a handful of different ways to implement singletons... so what are they?   The Not-Thread-Safe-Singleton With singletons, the main goal is to ensure that only one instance can be created. Below is a snippet of singleton code that works, but is not guaranteed in a multi-threaded environment: internal class NotThreadSafeSingleton { private static NotThreadSafeSingleton _instance; /// /// Prevents…

0 Comments

Example: Getting Data Back From An EventHandler

Background I previously wrote about why I like to use events here and here. I figured it would be appropriate to illustrate a simple case where you can delegate decisions between functionally separate parts of code (say, between an application layer and a presentation layer). If you're well versed in C# and .NET, this might put you to sleep. If you have no idea what I'm talking about, hopefully this will help. By the end of this, hopefully you'll have a better idea for how you can use an EventHandler to pass data/state back through an invoked event... And don't forget to check out the code! The Scenario Let's assume we have a layered application, which is usually my go to. I might have three layers: one for data persistence, one for my business logic and one for interacting with…

0 Comments

Keep Your Fields Private

Background A recent discussion about this spurred a bit of a debate. Ever since I can remember, I've always been told to keep fields private. If you want to expose them any more than private you should use a property. Of course, I was defending my stance on this and figured I should see what other people were saying. I turned to the trusty Stack Overflow (SO) for some answers. Argument For: Control One of the major categories of arguments for keeping fields private has to do with control. Some great points brought up by SO posters included that properties allow you to easily add verification to your data storage. With a field inside of your class, your control is over how this variable is manipulated is constrained to the class. As soon as you expose something outside of the class,…

0 Comments

Weekly Article Dump

Quick Reading Update! Here's a collection of things I shared over the past week. It's a short list this time around, but a quick reading update right before the weekend might provide you with a couple topics to look into in your downtime: A Secret Of Long-Term Business (And Career) Success: Your career and what you do in life should have purpose. The 6 Rules Of Life: Specifically, rule 6 is something you should be thinking of. Getting Colleagues to Carry Their Weight: Put an end to slackers... Especially for those that may not even realize they're slacking! 6 Habits of Extraordinary Bosses: A handful of great points for being a good leader. Why Business Meetings Kill Productivity: We've all been to meetings that seem to drag on for far too long. Do what's in your power to make meetings efficient!…

0 Comments

Potential Future Readings?

Based on this survey over at Code Project, I feel like I might have some reading to do. Let Us C: Seems to be at the top of people's lists. As the name implies, it's for the C programming language. My only concern is it might be too specific to C and not provide enough carry over to other languages. Definitely something I'll investigate. Code Complete: This book has amazing reviews. It looks to cover all the fundamental parts of programming, so this one might be top of my list. Java: How To Program: I actually wasn't overly impressed with the few reviews I read about this book. Especially after having it sized up against Code Complete. It might have to take the back burner for now. C++: How To Program: Even fewer useful reviews for this. Considering it's C++,…

0 Comments

Why Events? Decoupling.

Background Previously, I wrote about how events provide you with flexibility in your code. If you take on an event-based paradigm, you can view your system as a group of components that have events execute when certain conditions are met, and less of a procedural view where X always must occur after Y. But what else do events let us do? Decouple your architecture! We all know decoupling is a beautiful thing, so let's see how it's done.   How Events Decouple Your Code So the big question then is, how? I'd like to start by providing framing an example architecture. If we assume that we have code that is decoupled by major functionality, we might have some sort of layered architecture. This could mean that we have three layers: presentation, application, and data. These layers would be responsible for…

0 Comments

End of content

No more pages to load