Currently in Migration - Jason Edelman's Old Blog
  • Home
  • About
  • Contact

Are you a Network Engineer looking to learn a Programming Language?

8/23/2013

7 Comments

 
It’s been something I’ve wanted to tackle for a while, but choosing one is damn hard, especially as a network guy who hasn’t programmed in a while.  I had two years of Advanced Programming (AP) in high school, but that was it and that was a long time ago.  With network agility, automation, APIs, and SDN on the horizon, how should you pick a language and what do you even want to program?  For everyone, it will be different, but I’ll let you know the path I’m taking and how I ended up where I’m at today.
Several months ago I reached out to fellow college alum in search of a tutor and I ended up getting in touch with an undergrad student who said they had some spare time and wouldn’t mind giving me a jump start “to program.”  This was great for two reasons.  One, it got me into a classroom type setting  (1:1) about once a week where I had to focus 100% on programming.  Second, undergrad students don’t expect a lot of money :).  You offer a little money and some career advice and return, they provide some foundational skills.  However, the downsides are they aren’t as well adverse in networking or even that deep in their respective languages (of course, everyone is different).  I met with my tutor a bunch of times.   I’d say 10-12 times over the span of 2-3 months.  His main focus was Java, so that became my focus.  All of my work in Java was done in Eclipse, a popular IDE.

I didn’t like how heavy Java seemed and that I had built a lightweight GUI (thick app) although it was a good experience.  Who distributes apps like that anymore?  If I’m really going to pursue this, I needed to learn web programming.  All of my questions around RESTful APIs, Python, and building web apps brought the relationship with my tutor to an end, but he told me about a friend of his that knew some “web programming.” 

We’ve all heard of the LAMP stack, so I thought, let me learn that.  Turned out his friend, my new tutor all of a sudden, knew this “stack.”  I followed some instructions got the stack up and installed Sublime (his recommendation) to get it going.  Sublime 2 is the text editor that I used for the whole project.  I’m sure there is a real IDE that I could have used, but I wanted to challenge myself.  A lost semi-colon had me troubleshooting for hours.  With an IDE, I imagine I’d have seen an error like in Eclipse, but it just made me be more careful, which I hope is better in the long run.  We met the first time for about 2 hours.  We talked about things like HTML/CSS (a lot of that), JavaScript, and of course PHP (a key component of the LAMP stack).  All of this talk around HTML/CSS turned me off at first because I just wanted to program!  However, it gave me a greater appreciation for all these 3 and 4 letter acronyms that I had always seen in the world of programming.  He later told me about “Twitter bootstrap” which is pretty cool and saved me a ton of time formatting down the road.  It’s a twitter-made CSS file that simplifies the formatting.  Going into this first session, I knew I couldn’t just learn for the sake of learning though, so I found a need at work and had a goal in mind.

My plan was to replace an excel file that gets emailed around almost daily by people who need to calculate budgets of sorts.  It included lots of inputs, but then some complex calculations are calculated on the data input.  Having a project at hand helped tremendously.  I now had a goal.  After my first 20-30 hours working, I realized I still had not even touched PHP though and that’s what my goal was.  I got so engrained with formatting forms, fields, text boxes, drop down menus, radio buttons, and working with twitter bootstrap, I was designing the user interface, but forgot about the actual code (and business requirement I gave myself).  A sexy UI does help sell though.  Another good lesson – if you design your application upfront and know all the inputs you are going to have, you can easily start the application programming part before you see the front-end presentation layer.  Easier said than done I’m sure, but now I know why there are dedicated jobs for each of these.  That said, after I was pretty happy with the layout, I started with PHP.  I was able to build multiple PHP files and 15-20 functions to try and modularize it as much as possible (over a period of weeks).  I think it was around 2500 lines of code.  Was I finished? 

What about all the data that was input? I had no intention on learning the “M” in LAMP, but I had to if this was going to replace an excel file.  Excels are static, it’s a database in itself and you can always go back and open it.  There needed to be a way to save the input data and/or calculations if this was really going to work.  One or two hours with my tutor on MySQL gave me the jolt to plug about 40 more hours into database work.   I used phpMyAdmin for almost everything so I didn’t do much with the MySQL CLI to be honest, but again, it gave me an appreciation for this stuff.  Months later when I went to OpenStack training and there was references for MySQL for all of the projects’ local databases, it made much more sense and I’m sure I’ll have some of the know how to check those databases out (or add my own tables, etc.) when I dive deeper into OpenStack. 

On a side note, there was a short period of time, I almost added JavaScript to the mix to validate and at the very least require some inputs be filled in before the form be submitted, but that didn’t happen.  First, this brought clarity to client-side vs. server-side languages.  Second, in that research, I learned that HTML5 has new functionality added where you can just say “required” in the HTML code to enforce a field be filled out!  Not as fancy as JavaScript, but kept me from a learning another language for this project and spreading myself too thin.

The project went as far as I wanted to take it.  I was able to store lots of data in the database and retrieve data back accordingly.  I went as far as integrating with AWS’s hosted database offering called Relational Database Services (RDS).  That was pretty cool actually because we know the Cloud rules.   All in all, it was about 140-150 hours of work.  That was a new skill and new language.  In a new language/framework today, that should take less time, much less time.

Picture
THE CLOUD RULES ----- Source: http://www.how-to-draw-funny-cartoons.com/cartoon-clouds.html
People kept telling me PHP is dead – so now what?  Not listening to my own advice about having a project/goal in mind, I started to think about other web frameworks to learn. 

I heard great things about Ruby on Rails, and going back to OpenStack, I remembered they are using a framework based on Django/Python.  This reminded me about Python and I had really wanted to learn Python since it gets a lot of attention for REST API integration and scripting within Linux.  I also want to be able to understand in more detail the OpenStack Horizon project just in case I want to customize anything there, if ever needed, so this is what I said I was going to learn.  I watched some of Google’s free Python classes online, ran threw a few exercises, and was on my way.  My plan was Python for a few weeks and then Django integration, so I thought.  A few weeks later…

For a while, I was on the fence on learning Cisco’s onePK.  It’s going to be a southbound protocol and I don’t need to learn it.  If I program anything in this new world of SDN and open APIs/SDKs, I want it to be exposed via a RESTful API via a controller, even if it’s just to communicate with one network node.  That was my thought process.  While I do agree learning the southbound side natively will make for a better foundation for the REST side, I just didn’t want to do it because the only libraries I could use right now with regards to onePK are for C and JAVA.  And I did not want to program any more in JAVA due to not being able to easily “web-enable” those applications that I’d be writing in Java. 

After much debate internally (in my head) and with some other folks, I was holding my ground until a patient engineer at Cisco said, well you can easily web-enable Java apps.  I heard him out and I learned about a new web frame work.  Why are there are so many damn frame works?  Anyway, I learned about the Grails framework.  Grails leverages Groovy and native Java.  Groovy is a Python-like language (very loosey goosey), but leverages standard java libraries, etc. and can also integrate with pre-existing java classes and .java files.  I saw a demo of this and was sold.  Web programming and onePK --- hopefully killing two birds with one stone.  The IDE for this that I’m using is called Groovy/Grails Tools Suite (GGTS).   I’m actually just starting down this path as you read this, so much to learn with the Groovy framework!  Really hoping the documentation out there is as good as what’s out there for PHP and Python.

I’m sure if I can ever program with Python onePK libraries, the Django/Py framework may be back in the picture, but I guess we’ll have to wait and see.  I may in dabble in Python anyway if time permits.  Not sure yet – it’s all about having time and having the right project or kick in the ass to get you going.

Well, that’s where I’m at.  As I go down each path, I continue to learn more about general programming principles and at the end of the day, that’s the most important.  Why?  For continuous learning and to prepare for what may come in the future. 

The syntax for each is definitely different, but high level concepts are the same.  My recommendations would be pick one language/framework in the beginning, go deep, and really understand the in’s and the out’s.  Jumping around like I am doesn’t make the most sense for most, but it does give a broader look at larger ecosystem, which is extremely beneficial as well.  The bottom line is do something and it in all likelihood will end up being a win/win for you.

When you look at technologies like PHP, MySQL, Django, Python, Rails, Ruby, Java, C, Groovy, Grails, etc. it’s confusing and a year ago, I didn’t even know where and how they were used. I still definitely don’t have all of the answers, but I know much more now than I did before I started, and that’s a step in the right direction.  That said, it’s hard getting some basic answers, so if you’re a network engineer going down a similar path, feel free to reach out and I’ll do what I can to help.

Check out an update on my progress here (10/7/13):
Network Control Manager - onePK in Action

Thanks,
Jason


Twitter: @jedelman8

7 Comments
Theo link
8/27/2013 05:07:15 am

Great post, I think more and more network engineers are realizing that the old way of networking is dead and new skills need to be developed.

I would love to get more info on your thoughts on Linux skills needed as well as how github works

Reply
Jason link
8/30/2013 05:30:39 am

Thanks Theo. Many thoughts all around and Linux will be critical as well. For any coding I do, I use a Linux based VM to raise my awareness and daily use of Linux. Responding to your other email now too. Talk soon.

Jason

Reply
francis link
1/1/2014 05:56:06 pm

great article you have there. I myself am a network engineer who really wanted to try programming but just couldnt because of other priorities ,now if im going to put time with programming, i really would like to choose the best programming language w/c is related to my field and is easy to learn

Reply
Anton link
5/18/2014 01:09:28 am

Hello Jason, you're an awesome author. Shared some good information that I really needed to learn. Been planning to learn programming language and this article pretty much inspired me. Thanks. :)

Reply
Tariq Hisny
5/29/2014 07:39:52 pm

Hi. Thanks for your posting.

I read it all. I'm bit confused. I'm a Network Engineer. I would like learn appropriate programming language. Can you recommend me which are useful for networking as well as for Ethical Hacking ?

Reply
Jason Edelman link
6/30/2014 09:34:33 pm

Go with Python :)

Reply
sundeep kumar
12/1/2014 12:27:48 pm

Hi Jason,

I am a Network Engineer, I have good command over C-language as I learnt that as a part of curriculum in my graduation, I don't want to waste my knowledge and interest towards programming. so can u guide where should I head from here.

Thanks & Regards,
sandeep.

Reply



Leave a Reply.

    Author

    Jason Edelman, Founder of Network to Code, focused on training and services for emerging network technologies. CCIE 15394.  VCDX-NV 167.


    Enter your email address:

    Delivered by FeedBurner


    Top Posts

    The Future of Networking and the Network Engineer

    OpenFlow, vPath, and SDN

    Network Virtualization vs. SDN

    Nexus 7000 FAQ

    Possibilities of OpenFlow/SDN Applications 

    Loved, Hated, but Never Ignored #OpenFlow #SDN

    Software Defined Networking: Cisco Domination to Market Education

    OpenFlow, SDN, and Meraki

    CAPWAP and OpenFlow - thinking outside the box

    Introduction to OpenFlow...for Network Engineers


    Categories

    All
    1cloudroad
    2011
    2960
    40gbe
    7000
    Arista
    Aruba
    Big Switch
    Brocade
    Capwap
    Christmas
    Cisco
    Controller
    Data Center
    Dell Force10
    Embrane
    Extreme
    Fex
    Hadoop
    Hp
    Ibm
    Isr G2
    Juniper
    Limited Lifetime Warranty
    Meraki
    Multicast
    N7k
    Nexus
    Nicira
    Ons
    Opendaylight
    Openflow
    Openstack
    Presidio
    Qsfp
    Quick Facts
    Routeflow
    Sdn
    Sdn Ecosystem
    Security
    Ucs


    Archives

    May 2015
    April 2015
    February 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    August 2014
    June 2014
    May 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    August 2013
    July 2013
    June 2013
    May 2013
    April 2013
    March 2013
    February 2013
    January 2013
    December 2012
    November 2012
    October 2012
    June 2012
    May 2012
    April 2012
    March 2012
    February 2012
    January 2012
    December 2011
    November 2011


    RSS Feed


    View my profile on LinkedIn
Photo used under Creative Commons from NASA Goddard Photo and Video