Book Review: Without Their Permission

I'll be honest, I've been excited about this book since I heard about it's release a couple of months ago. I consider Alexis Ohanian to be a true defender of internet freedom and of all the good things that can come from it. Without Their Permission definitely highlights some of the most recent awesome things that have come from the internet being free where anyone can create a site for their passion.

What's Inside?

The book is divided into three basic parts - how Alexis co-founded reddit - one of the most visited web sites today, a few examples of other websites that are changing the world, and how anyone else can do the same.

The story of how reddit was started was itself an interesting tale and perhaps even one that can be its own book since it's also an inspiring read. Who would have thought that one of the most popular web sites may never have existed.

Alexis gives a few examples of other websites that set out to help the world be a better place. With sites like Kickstarter and DonorsChoose, it's hard not to see that people really want to help...and they do. I've participated in both, myself and it is, indeed, very rewarding just knowing that I played a part in helping out.

In fact, with DonorsChoose you can get the added reward of thank you notes directly from the students of the class in which you supported. It gives the reward a bit more of a personal touch. Below is one that I've gotten recently and I can't express what I felt when I read through them.

Thank you note

The third part is where Alexis gives his advice on how anyone can create something without anyone's permission. He gives the advice based on his own experience as well as the experience when he did his investments to other web sites who he feels will help the world. He even gives ideas on how to learn to code if you've never done it before.

Final Thoughts

It didn't take me long at all to finish this book as it was an easy read. It even made me laugh a few times. I'll definitely keep this on the book shelf and will even re-read it several times.

If you're looking to start something this book will definitely be a good kick in the right direction. It even felt like the book made me want to start something at the moment I was reading it. It's not just for people wanting to start a business, it's for people wanting to start anything.

Bonus

Alexis has done quite a bit for the community as a whole. To help introduce you to his work here are a couple of things he's done.

TED Talk about social media and the power of community.

Audio excerpt from the final chapter of Without Their Permission.

Book Review: Masters of Doom

If you were like me and you grew up in the 90s and played any sort of video games then I'm sure you've played Wolfenstein 3D or Doom. Though, regardless if you were into gaming, these games probably marked the beginning of an era in computing in general.

I've heard about this book when I just happened to find it on Amazon, but what wanted me to read it was that it is apparently the book that helped Alexis Ohanian want to start a company so it actually helped make reddit a reality.  After finding that out I thought I just had to read this book.

What just starts out as a few guys who just want to make games that they themselves wanted to play soon turns into an empire. Instantly I can tell this is another nonfiction book that just reads so much like a novel. It starts off with telling the early stories of the Two Johns, John Romero and John Carmack. About their gaming passion and how they got into programming games, and early on you can tell that they were destined to create their own masterpieces. After a little while creating and developing games for a small company they get the itch to create their own company. With Romero's creative ideas and Carmack's programming talent, they definitely have what it takes. They created id Software.

With the help of a few others they recruited, they were able to make their first game Commander Keen. Now I remember playing this back in the Windows 3.1 days and I had no idea it was id who created the game. Their next big title was Wolfenstein 3D. I still have memories of when I first played this and I'm sure, like myself, it the first time others have played a first person shooter. Their next blockbuster is perhaps the one they're most famous for, Doom. I think it was the first time I was hesitant to open a door in a game because I wasn't sure what was behind it.

 

Of course, there were some inner struggles within the small company that the book goes over as well. Eventually a few of them left to pursue other interests, but their initial passion of creating great games never ceased.

This was definitely a joy to read and, if you're a developer as well, you may just get a little interest in graphics or game programming yourself.

Small Change: Disqus Comments

After noticing that more and more blogs and other web content are moving toward using Disqus as their medium for comments, I thought it would be best to move mine over to the platform as well.

The main advantage I wanted to gain for the readers here is that there is one less thing for them to have to register and/or worry about following. With Disqus, you have all your comments and actionable items in one place and users have the ability to even use it via a login from other social media sites. It's a total win-win situation! 

Core C#: Delegates

Microsoft has made it easier for aspiring developers to easily get started creating something when they came out with the C# language. However, there are definitely some advanced aspects of the language that take quite a bit longer than others to fully grasp. Delegates is one of those types of language features. Hopefully by the end of this article you'll have a deeper understanding of how utilize delegates in your C# code. 

I, myself, had trouble trying to fully understand what the purpose of delegates were. If you were to ask me before what a delegate was, I would just give a small answer indicating that it's similar to a method template. While that's true, it does quite a bit more.

The simplest way I know to go over delegates is to just go through a small example to allow you to also do the same so you can use that to experiment around with the code.

Let's go through this a bit. The first line is where you actually declare the delegate and give it a return type, name, and any parameters if it needs any. In our Main method is where we'll initiate a couple of variables to hold the delegates. The first one, myDelegate , does so using the method syntax. Our second variable, however, we declare it using an anonymous delegate, or a delegate without a function name.

After we've declared the our variables with our delegate, we can then invoke our delegate by calling it just like a method just like in lines 15 and 16 above. We declared our delegate to take in a single string parameter, so that's how we'll invoke it. 

Built in Delegate Types 

The folks at Microsoft were kind enough to give us a few built in delegates that we can also use within our code. Let's take a quick look at them. 

The first one, which may be the most commonly used, especially if you've messed quite a bit with the LINQ method syntax, is the Func  delegate type. This one will take in zero or more parameters and will return something back to the caller. In the example above I have one parameter of a string and I return back an integer.

The second one is the Action delegate type. Like the Func type it takes in zero or more parameters, however it returns void (returns nothing).

The third one, Predicate, is a bit closer to the Func type where it takes in parameters and returns. The difference with this is that it will always return a boolean true or false back to the caller.

Invocation Lists

One of the magic things that delegates have is they keep track of all invocations of it. When we instantiate our delegates we are actually adding to the invocation list. Another way to do this is to simply add a delegate to another delegate. 

We'll see the true power of delegates and their invocation lists in the next part, when we talk about events.

Consuming the Jamendo API with AngularJS: HTTP Get

After doing a small AngularJS introduction, I figured it's time to start diving into some specifics of an Single Page Application with it.

One of the awesome things developers can do is to play with other third party services. A common way to do that is with an API that is provided by the creators of the service to give developers the option to create all sorts of software to use or interact with their services.

Honestly, I had a class library created and ready to create a C# wrapper to make the API calls, but I thought that I should use more client side code instead of server side code as that tends to be more of how things are being done these days. I thought I'd use AngularJS, which I chose so I can learn more on how to use the framework and well as to get used to developing more with JavaScript.

NOTE: For the API calls to Jamendo I'm using a clientId that they provide for testing and demoing only. This is required to use the API and if you want to take full advantage of their API you will need to register in their Development Center.

For this first part I'll construct a simple artist search via $http from Angular's API to return a few items back from the Jamendo API for display.

The HTML

The HTML is a fairly similar setup as the previously mentioned introductionAnd please remember, I'm by all means no designer (though, I have been reading up on the subject) so I apologize in advance if it causes you to cringe. 

What we'll concentrate on is what all is in the body tag as the items in the head tag are just pulling in different resources. We tell the body tag to use our Album controller (we'll get further into that below). I then created a div tag that uses a class from one of our CSS files to move everything in there to the near center of our page. 

Now to the fun stuff. Inside our container we have a text input and a button. Our text box will be what artist we're searching for on Jamendo and our button will be used to conduct the call to get our results.

On our text box we have the ng-model directive named "artist". We'll see how this gets used later in our controller.

Our button has the ng-click directive which tells Angular to execute this method on our controller once the button is clicked.

The Album Controller

Once again, this is fairly similar to our Employees controller from our introduction. The differences are fairly small, however. One thing you may notice is when defining the controller function I bring in an extra parameter that AngularJS provides. Along with the $scope I bring in $http to be able to call another site. In the function I create another function called getAlbums. In here is where I actually make the call via the get command. You'll also notice that I'm using promises that is also provided by AngularJS.

Here's another part of where AngularJS's data binding comes into play. Remember the ng-model of "artist" we had in our text box? That was bound to the $scope and was used in the call to Jamendo. That's all we had to do.

Enabling CORS

You may have noticed that you haven't seen where I create the "jamendoApp" module in the controller. This is because, after some reading and viewing others code, I created a base app.js file that handles that as well as some config and routing settings that will be used throughout the whole application.

Also another thing to make note of is that, since I'm using AngularJS to make a third party call to get data most browsers may not allow the call to take place due to having to enable cross-origin resource sharing. If you tried to make the same call without enabling CORS you would get a same-origin policy error. This basically allows the browser to only access resources that are in the same domain as the page you're calling from. To get around this I got help from this StackOverflow question and implemented the configuration below. 

Demo

To demo how it all works GitHub makes it super easy to view HTML pages from our repositories using an HTML Preview. Simply go to this page to interact with it and feel free to come back and let me know what you think about it.

Full code to play with can be found on the GitHub repository. 

Next time we'll refactor the controller and have our API call from a AngularJS service.

Top People I Follow on Twitter

I love Twitter. I like how it's one of the best ways to share content and thoughts with everyone else. However, following too many people can put too much of a strain on you when checking for updates. I, like I'm sure many others do, have a few people I make sure to read each update I come across. Here's a list of those few I do my best to keep up with.

Note that when I say "people" on Twitter I also mean organizations as well as individuals.

Alexis Ohanian

Alexis is probably most famous as being cofounder of reddit, but he's definitely doing some amazing work these days. From writing his own book (you bet I got this the day it came out) to hosting an entrepreneurial show on The Verge - Small Empires, he's definitely one to follow and I'm always excited to see what he's up to next.

Twitter - @alexisohanian

Inc Magazine

If you're interested in business or leadership at all, this magazine and site has a lot of great articles that I've found useful. Their site practicing minimalism and very easy to navigate also helps.

Twitter - @Inc

Kevin Rose

If you're into technology at all, then this name should at least be familiar to you. Coming from the old (and awesome) days of TechTV via the show The Screen Savers, he's also the founder of Digg and now currently works with Google Ventures helping to find other awesome web start ups. 

Twitter -  @kevinrose

Darya Rose

Yep, the wife of Kevin Rose. She's fairly well known herself for starting a food blog - Summer Tomato (whom I happen to have found from the person below) and from there her own book - Foodist. Darya is definitely one of the best I've come across in terms of breaking down the science of healthy food into a way that is easily understandable. If anyone I meet has questions on food I always point them to her.

Twitter - @summertomato

Tim Ferriss

Famous for his books - Four Hour Workweek, Four Hour Body, and Four Hour Chef, I definitely consider Tim to be a modern day Renaissance Man. From starting his own nutritional company to becoming a tango and kickboxing champion, Tim has tons of experiences and he freely gives his advice away on his blog.

Twitter - @tferriss

John Robbins

This can't be a post on a development blog without a developer, could it? I consider John, cofounder of Wintellect, to be one of the best when it comes to doing anything with .NET. This is the guy who got me interested in performance and debugging. When Microsoft has them come in to teach their developers, I make sure to listen on what they have to say.

Twitter - @JohnWintellect