I code, therefore I am... nerdy

Grokking Sockets: Physical Layer

After a short time of thinking, I’ve decided to focus on the 7 layers of the OSI model. We will be building off the knowledge of each layer to see how they all work together harmoniously and how we can trick them into going just a little bit faster. I guess that makes this series an eight part series, so it’s going to be one long journey. Of course, this series isn’t called “Kinda knowing sockets,” or even “Mastering sockets.” It’s called Grokking sockets. That requires a deep, xen like understanding of networking. And that includes layer one of the OSI model, with all of its hardware goodness.

Grokking Sockets: Overview

I’ve worked with socket programming on and off (mostly on) for a good ten years. Although this doesn’t make me an expert, by far, this has given me good insight into what seems to work and what doesn’t. This will most likely be a multi-part piece as sockets are a complicated beast. What I will be talking about is a very low level understanding of how sockets work and what each of the seven layers of the OSI model mean to you. Hopefully you will have such a level of understanding of sockets and protocols that you will grok them. Only when you reach this level can you understand how to max out performance.

Maybe Your API Sucks

This goes back to my love/hate relationship with Ruby on Rails. I’m an enterprise .NET developer by day, but I’m trying to be a rails developer by night. I say trying, not because I don’t know rails, but because their documentation sucks. Sure, there are plenty of tutorials for beginners, maybe some for intermediate developers. They are spread out across the internet in a haphazard way. Mostly blog posts showing something cool they found out by perusing the rails codebase or by word of mouth. So their documentation sucks, but I believe it’s something deeper. Maybe your API sucks.

Cloud, Meet Enterprise Software

What defines enterprise level software? It’s usually defined by software written for groups or organizations rather than for a single person. Enterprise software has historically been large, expensive systems backed by huge companies such as Oracle and Microsoft. Has this changed? “Cloud” computing has been promoted for a while as the solution for downsizing the costs of running enterprise level systems. Wouldn’t it be great to outsource the entire server room and not worry about hardware failures ever again? It sounds like a fantastic idea, but it hasn’t caught on in large organizations.

UI Programming: You’re Doing It Wrong

"hourglass" Let me ask you a question; a serious question. How are you handling events in your GUI applications? Are you just running code whenever an event comes? Is your application trying to work well with others?

Now tell me, does it match the following?

public void OnClick( EventHandlerArgs args )
    ThreadPool.QueueUserWorkItem( _ => DoTheWork( ) );

If it doesn’t, you may be irritating your users.

Think Functional: Lambdas and LINQ

If you haven’t read the previous post, Immutable Types and Idempotence, I recommend doing so now. It will help you get a better understanding of what I’ll be talking about here. Now that we have basic knowledge of what a pure method really is, we need to figure out how to use it. It’s not that difficult, but the syntax may require some getting used to. We’ll be using .NET’s LINQ component to describe how to use lambdas to increase your code efficiencies, but these ideas travel well into the C++ world using either Boost.Lambda or C++0x, if your compiler supports it.

Think Functional: Immutable Types and Idempotence

I already talked about functional programming recently in a prior article, however I state that functional programming is difficult (but in a different way). The problem is it looks like you have to forget everything you learned about object oriented and procedural programming. Seems like a waste to throw away all that good knowledge to blindly go down a path that hasn’t even hit mainstream yet. You don’t have to. You can start programming “functionally” right now no matter what language you use.

Some of My Past Projects

Over the years, I’ve of course worked on a ton of projects, and some of them I open source. Usually I do this if the project was school related, back when I was in college, or I want to hand over the project to the community. Of course, neither go very far after that since it seems like you need to be known and you actually have to build something useful. Anyway, here I’m going to list some of those projects and where you can find them.

CPU Speeds Have Maxed Out… Now What?

So, you now have this 8 core powerhouse. It has more horsepower than your old Mustang, but your code is only using 1/8th of that power. How come? Because while the rules of Moore’s law changed, your code hasn’t.

Coders’ Survival Guide to Startup Weekend

As you may or may not know, Startup Weekend is a weekend where business developers, coders, and designers get together for one long weekend and try to create a startup project from idea to production. This may seem strange to the general coding population where timelines are measured in months, but with the right idea and enough motivation, things can happen.