The Education of a Programmer (Me)

Just another site

Video Review – Deploying Angular JS

I was recently contacted and asked by Packt Publishing to review a video, Deploying Angular JS by Thomas Tuts. I was asked mainly because I have purchased and have been given to review several books on Angular JS lately. In return for this review, I was given a copy of the video as compensation.

I am glad that I had the opportunity to access and watch this video. Mr. Tuts does an excellent job at reviewing how to scaffold an Angular project, develop it, and then use Heroku to deploy the site after completion of the coding. The video segments are fairly short, all around 5 minutes in length, and along with Mr. Tuts’ sonorous voice, the coding provides a very good lesson in building out an application quickly and efficiently.

Mr. Tuts also brings more than just Angular into the toolkit. He covers using Bower, Gulp, and many other tools together, including JSHint and testing frameworks. I was surprised how easy it appeared to be to get it all together. It’s inspired me to work on a couple of personal ideas to see what I can do with all of this together.

I really can’t think of any criticisms of the video. I learned a lot out of it in repeated viewings and would recommend it to anyone who wants to learn how to put this together into the tool belt.

Packt Publishing sale

Well, I’ve been a bit under the weather lately, so I’m a little late to the party for my friends over at Packt Publishing. They are running a huge eBook sale from now through the 6th of January. All eBooks will be $5 during this time. You have to go check it out. The link is: Packt Publishing $5 eBook Bonanza.

Go check  them out!!!!5 Dollar - Social Media

The value of slow coding

When I took my first programming class going after my Master’s Degree. My instructor then, John, told all of us that if we sat down to code and wrote 100 lines of quality code in an 8 hour day that we were really great programmers. At the time, I thought he was being somewhat facetious. I’ve worked on projects where I turned out several hundred lines of code in a day which was ultimately deployed and considered useful.

Then wisdom followed knowledge. I know how to code. I can figure out what I’m after, write it, and it will pass tests and it will work, but I also learned from John to re-visit my code and always try to make it better. Whether that’s more memory or processor efficient, or just generally create a better algorithm to do what I need to do; it didn’t matter, just to re-visit the code after I’ve left it alone for a while.

Now I’m working on a project and I realize that in the last two days, I’ve written maybe 200 lines of usable code, other than metadata code in wiring up a database to a web app which ensures better type safety, etc. That’s the stuff I write without thinking and while it’s necessary, it’s not the most stellar code.

This morning I found myself really proud of 4 lines of code. It took me some thinking and research to write 4 lines, but in the end, it was 4 good lines that did what I wanted and were well-crafted. So, now I’m realizing John was really right; slower coding produces better results.

Weird Font Post

Ok, I know that I usually write book reviews or about something I’m coding, etc. This time, I’m writing about something a little different; fonts. I admit, I’ve always been fascinated by them. I love the written word and have always studied orthography when I was in my Linguistics program. So it serves to reason I would be just as fascinated about fonts. I almost added a graphic arts program to my current mode of study just to have a chance to learn how to build my own fonts. Well, one font anyway.

I write programs, so I stare at a lot of code and I have searched through many many fonts, trying to find one that made me happy when I had to read so much code. I’ve seen many which were close except for something which would drive me to distraction. Maybe it was the curve in the lower case l or the lower case i. Maybe it was the dotted zero. (I even write a slashed zero in handwriting, thanks to my wife.) Whatever it was, it never fully felt right. Then I stumbled upon Input. The thing which stood out immediately for me was the option to customize the font to what I liked. They had options for miniscule a, g, i, & l. They have zero options, curly brace options, and asterisk options. Basically, I could make my font the way I wanted it to look.

Then as I would read about the development, I emailed the designer and got a very nice return email which invited me to continue to note things I’d seen in the usage.

It comes in the standard Mono, Sans, and Serif, with several weights and several kerning options, (regular, narrow, condensed, and compressed.) So to have it for Visual Studio, I make my own custom variation (InputMonoCompressed) and it looks fabulous, I can read it all day, and then I can use the other variations in other apps as I see fit with no headaches.

Best of all, you can use it for free in certain circumstances. However, if you want to use it for commercial publication or for your website, you have to pay for it. That’s fair in my book. When I can afford it, I might just buy a license to use it on a personal website. Until then, I’m going to gratefully read code in it while I work!

Out-thinking, but not outwitting myself

Like any good programmer, I keep trying to re-factor some of my code to make it more efficient, better, etc. Now that I’ve become more comfortable with Linq to EF and Oracle together, I realized it would be time to re-write our Hot Calls program. (Not what you think folks). Even though Syncfusion has come out with one of their Succinctly series books on NHibernate, I don’t know that I’m going to make the switch just yet. I would like to try it as a test some day so I can get familiar with it, in case I ever have need of it.

However, I started with the Poller which scans a database of incoming calls and takes the newest calls to a series of temp tables for the logic program to handle. This program doesn’t really lend itself well to either EF or Linq for that matter; so I’ve written the SQL by hand but I still wanted to tweak it. The headache was the first place which lends itself best to the tweaking was the exception handling. Finally, I’ve wrapped my head around overloading my functions enough that I’ve built workable overloaded mailing and logging functions which I can reuse as I’ve wanted to do for some time. Doing this appears to remove nearly 40% of my code base. That is going to be a huge difference across all of these functions. I know I have more re-factoring to do along the way and soon it will be even tighter. (Don’t worry, the commenting is still as verbose as always.)

Yay! Hail the little victories here and there when you can get them.

Book Review – Becoming Functional

I’ve recently been reading Becoming Functional by Joshua Backfield. As usual, the disclaimer is that I received a copy of the book for free in return for the review.

I was interested in this book, primarily because I have always been of the opinion that some of the code I’ve written for a couple of programs I’ve developed could be better written using a functional model as opposed to the traditional declarative programming model I learned in school. After reading this book, I’ve realized my instincts are better than I thought and that I’m right in that belief.

Mr. Backfield does a very good job stepping the reader through a fictional company where, as a developer, you’re trying to make some of their back end programming more efficient and more responsive to the user. He starts by walking you through the company’s code and then refactoring it step-by-step to more and more functional paradigms. Along the way, he does a good job of explaining functional programming in brief and how factoring the functions can make everything work more efficiently.

When I read the book for review, I only had the first six chapters available, but the chapters on immutable variables and recursion were enough for me to be sufficiently impressed and to have some ideas on where to take my own code. I am certainly going to go back and finish the book and work my way through the code.

Even though the code examples are in Java and Groovy, it’s not difficult to see how to change them over to C# and possibly F#. (For programmers like myself in the ASP.NET world.) With this in mind, it won’t be hard at all to work out the refactoring method by method.

Overall, for an experienced declarative programmer, this is a great introduction and a good guide to adding in functional concepts where they are called for. For less experienced programmers, this is a great way to look at a new paradigm while gaining a good understanding of how it can work in the real world. I heartily recommend the book for anyone interested.

Step by step in Vim

I kept reading Ben McCormick’s blog entries about Vim and am going over other tutorials and books I have in my collection and I felt comfortable enough working on a file to never take my hands off the keyboard and NOT go into insert mode as the default way of doing things. For me that’s a bit of a win. I did a few significant updates to a behind the scene page so now I feel safe enough going from there to start building and having more fun with things to see just how comfortable I can get. 

I know it’s always one day at a time and that’s how you learn. It’s just fun to make some progress and remember the ways to do something more efficiently and go from there. (Yes, I’m a geek and things like v18ld to pull a piece of a string out of a url is pretty cool to me!)


Next step in the evolution and education

I spend a lot of time in front of a keyboard. That’s the nature of programming. Since I also write websites, I also spend a lot of time on the web, reading about programming and the like. 

Recently, I ran across a wonderful series of articles by Ben McCormick on Vim. Here is his first post in the series. He made me think about a few things, including the fact that though I have a couple of editors I love and use a lot in the Windows world, I have never mastered Vim myself. (Now, for those of my readers who are Emacs fans, I’ve never mastered it either, but in trying to use either one, Vim seemed easier to me, so I’ve tried several times to learn it as opposed to Emacs. No flame wars here please!) 

So I’m going to use his posts as inspiration and the resources I have available to me so I can really make an effort to learn Vim and learn it well. The truth is, it should not matter what computer I am at, I should be able to sit down, fire up Vim, and be able to work on a file regardless. I can’t do that right now and that bothers me. It’s not about programming chops or anything like that. It’s really about the ability to go where I need to go and be as productive as I can me. Yes, I know that I have Visual Studio or Sublime Text available on my normal rigs and I have sublime and Vim both on a flash drive, so for a Windows OS, I’m relatively well set. However, I came from the Linux world. (Yes, I actually have worked with Linux as a primary desktop OS since a 1.2 kernel and the fact that I have not mastered Vim and LaTeX do make me hang my head some days. I had more success with joe and nano.)

So the goal for the second half of the year is to learn both Vim and LaTeX well enough for every day usage. I know that I need to learn them and I know they will be beneficial for me to learn and master. 

My question for you my readers, if you are out there, is what other resources do you know of which might help? I know about vimtutor and I have a few eBooks on PDF which will help me. From there, it’s time to get cracking and any resources are fantastic.

Packt Publishing Sale

Disclaimer – From time to time, I do reviews for Packt Publishing and in return, I receive free copies of the books I review. I also write blog posts like these to promote their sales from time to time. I do this because I like the quality of their material and with more business, there are more opportunities for me to review books for them.

They are now celebrating their 10th anniversary and they are running another sale, hence the reason I’m writing this now. From the 26th of June until the 5th of July, Packt is offering all of their eBooks and videos for $10 a piece. While they are normally affordable, this is a very good sale. If you are going to go check it out, and you should, use this link so they know you came from my blog. Or click the graphic below!


10 days 10 years - Home Banner

Even more inches and Github Commits

Well, Bugs and I, from my previous post have made many more strides on my “wascally web app”. (Pardon the pun, but I’m full of them when I’m trying to make sense of this stuff.) Now, it’s deployed and useful. I’m at the stage, now, where it’s fun working on it and making the incremental improvements which ensure that my admins will not only use it, but will like how it comes out.

The nice part was solving each of these incremental mysteries and then improving it without saying, “I can’t do this, solve it for me,” on the various boards. I added in a search feature for subscriptions based on the user id so I can grab each users subscriptions. It was built in response to not being able to delete a user until the subscriptions were accounted for because of foreign key relationships. Later, read today, I changed the table structure of the underlying subscription table to enable cascade deletions so when you delete a user, the database also deletes the user’s subscriptions.

I’ve left the ID to be set by the admin because it works and because I can reuse IDs that way for deletions. Oracle’s default behaviour is to reserve 20 id’s at a time when you write an incremental ID trigger. So this seems to circumvent that. It’s a little more work from the admin, but it’s not too onerous.

I fixed the name entry into upper case through javascript. It works and it’s not problematic, so I’m happy about that.

I built my dropdown lists with a little bit of help and then added those into the page along with finding the IE problem. It turned out to be client side and with a little adjustment to the quirks mode, it’s all good. So this is, effectively, done and deployed. YaY!!


Get every new post delivered to your Inbox.

Join 904 other followers