Saturday, October 29, 2016

The Source Code for for My Second Dash Project (Personal Blog)

<!DOCTYPE html>
<head>
  <link href="/normalize.css" rel="stylesheet">
  <style>
    header {
      text-align: center;
      background: url('https://i.ytimg.com/vi/M9RkUnmeW6I/maxresdefault.jpg');
      background-size: cover;
      color: white;
      font-family: ubuntu;
    }
    a {
      color: white;
    }
    h1 {
      font-size: 70px;
    }
    img {
      margin: 40px 0px 0px 0px;
      border: 7px solid white;
      border-radius: 20px;
    }
    ul {
      padding: 10px;
      background: rgba(0,0,0,0.5);
    }
    li {
      display: inline;
      padding: 0px 10px 0px 10px;
    }
    article {
      max-width: 500px;
      padding: 20px;
      margin: 0 auto;
    }
    @media (max-width: 500px) {
      h1 {
        font-size: 36px;
        padding: 5px;
      }
      li {
        padding: 5px;
        display: block;
      }
    }
  </style>
</head>
<body>
  <header>
    <img src="https://goo.gl/JEnUHP" width=20%>
    <h1>Alexander's Blog</h1>
    <h2>The long and short about me.<h2>
    <ul>
      <li><a href="https://missiondevops.blogspot.com.au/">Mission DevOps</a></li>
      <li><a href="http://alexandergarber.blogspot.com.au/search/label/missionmobility">Training</a></li>
      <li><a href="http://alexandergarber.blogspot.com.au/search/label/theodessia">The Odessia</a></li>
    </ul>
  </header>
  <div style="width: 100%; overflow: hidden;">
    <div style="width: 50%; float: left;">
    <article>
    <h2>Mission DevOps</h2>
    <p>My mission is to become a software developer, and ultimately a DevOps engineer. On this blog I will share with you my journey into this exciting and complex profession.</p>
    <button>Like</button>
  </article>
 </div>
    <div style="margin-left: 50%;">
       <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjk9lmDzihezMpVjVM7dGc_GkuhRrEF6ix_BpDF15bTTXR1OTzHyC9mcx3VDlgtxI_wtbi6RcnZkxKu0am-gVr6JfMTcehWyRB_ZSNT3uWeN5Jg-YVFKLUR6GkP_0G0MG-A74RXa3sShktP/s1600/Screenshot+from+2016-10-26+13-53-52.png" width=50%></div>
</div>

  <div style="width: 100%; overflow: hidden;">
    <div style="width: 50%; float: left;">
    <article>
    <h2>Strength and Flexibility Training</h2>
    <p>Since the early 2000s I have been on a personal quest for an antidote to the sedentary nature of modern living.  I have learned much that I wish to share with the world.</p>
    <button>Like</button>
  </article>
 </div>
    <div style="margin-left: 50%;">
       <img src="https://lh3.googleusercontent.com/pBIqNtwwHBtkI2LLgXDWz6aLOdHy7Vb7VzgrJFPJBWCHg249Gc02FArZNUKDHWLw468KS7f_0Pcv3ENeojgP9N4D3Ho6JB-YIoUBQQcAfy8GG80WFXt_SGK8WJG_O57NvB5O2ZA4GiUrw4gttYfbVqfF_QVnzp-REYoZ-23iH1KnLP2iVe5vUUJM-22APxl-Uf-kZVghdonwlb5_i8-3fzmDbMLSF96fd21OtshYWR-8nvon6H6tuwP2NV_zqbhx1nUiYw3Wm5ZYlu2cgpDcIAFJ4YoMdCfWeJZ6e11B-yn3uhUZYyY--xUE6sz2i3bBXZI0G-GlhhR-VLgIM_4ZYMUpJQ0lpAQx_qYMpLeBOAYAh09Psm-CDTJFlRaHblo81-HN9mBdw73dxR0V3TN32HtuH3vLdkx13awaNQEdV-KIjcdg6cO1SIIL54ouSnfrDMJUvRZJtQF8D_u9QpHB7FGaGWm-UKBiodgCDWSK2Knhtl72x5HVhn6ABD0DAjWFFUYttfvN4_RPR2Ton_qz4KPU2jc_U4OSwDj-MsGOy8MC9Tt5YcNo_hevx45nDDMtSzDRr4dOcQektxIeeN-1JFqgU0G07dBne9izWwRZa0QH9s--=w506-h491-no" width=50%></div>
</div>

  <div style="width: 100%; overflow: hidden;">
    <div style="width: 50%; float: left;">
    <article>
    <h2>The Odessia</h2>
    <p>The Odessia is a fantasy novel that explores philosophy, free market economics, love, life, and the universe through the adventures of its heroine, Odessa, and her travelling companion, Trousers the cat.
</p>
    <button>Like</button>
  </article>
 </div>
    <div style="margin-left: 50%;">
       <img src="http://theodessia.weebly.com/uploads/4/1/5/9/4159515/916806.png?432" width=50%></div>
</div>
  </script>
</body>

Thursday, October 27, 2016

Atom Text Editor: My New IDE?


When I first learned Python I spent a lot of time in interactive mode:


And when I finally started using Gedit, the syntax highlighting and bracket completion felt luxurious.


But the time has come for a proper IDE.  I can't justify shelling out $200 for RubyMine just yet, but Atom 1.11.2 looks very promising.

Of course, I could learn to use Emacs or Vim, but that's probably a bit too far for me at this stage.  I'd like to get there one day though.

Wednesday, October 26, 2016

First Steps in Ruby on Rails



My first course on Code Academy is complete.  It's a small step, but an important one.

DevOps Career Path Map, Version 0.1

DevOps Career Path
DevOps Career Path, Version 0.1

This is my first attempt at charting the course towards DevOps.  From what I can tell, DevOps engineers are drawn from the ranks of experienced software developers, or failing that, Computer Science graduates who need minimal training to work competently in a DevOps role.

Unfortunately for me, I meet neither of those requirements, which means either working my way into a software development career or going to university.
I have spent enough years at university; as far as I am concerned, if I need a degree for the job, the job's not worth it.
Ergo, the path to DevOps will be via software development, which raises the question of how to become a successful software developer?

I see broadly two avenues:
  1. Working as a junior developer or serving an internship.
  2. Getting an auxiliary role, e.g. in technical support or on the customer helpdesk, to get into the company, from which point I can work to be promoted into the development team.
For the latter I am already eminently qualified.

For the former, my daily work can be divided into three areas:
  1. Studying programming, i.e. learning to code at a professional level.  A good starting point is Code Academy and Udemy.  Once I have completed the courses through those websites, I think I'll have a much better idea of where to go from there.
  2. Online self-promotion.  This includes my blog, using LinkedIn, etc.
  3. Schmoozing with professional developers and DevOps engineers.  In Melbourne, there are Meetup groups for DevOps, Python, Ruby, etc.  I have already joined those and will keep an eye out for any others.  At the moment I'm quite enjoying Ruby; although I started on Python, I think Ruby might become my favourite language.  I'll see how I feel in a couple of months.
That's it for now.  Does this seem like a good plan to you?  Any suggestions?

Monday, October 24, 2016

Thoughts on Refactoring Code

http://www.ben-morris.com/wp-content/library/refactoring-vs-rewriting.gif

I'm working on my CareerCoach job research tool, and I'm finding it very tricky to refactor the code.
There are too many moving parts, too many variables.

I'm trying to convert blocks of code into functions, which means that I have to turn variables into global variables, and that gets confusing.

I think I need to map out in more detail what I'm trying to achieve and then work on each component separately.

For now, it's time for a break.

Saturday, October 22, 2016

Thoughts on My First Code Retreat

When I turned up at the annual Melbourne Coderetreat, I was nervous and reticent.  I am not a professional programmer -- yet -- and I had no illusions of keeping pace with people who do this for a living.  Nevertheless, I stuck it out and learned an awful lot.  The organisers Tomasz and Ilya did a fine job of running the event, and I appreciate their encouragement.

Conclusions and Ideas:
  1. Do puzzle programming.
  2. Make code kata a regular practice.
  3. Focus on one language, either Python or Ruby and learn programming concepts thoroughly.
  4. Attend programming meet-ups, preferably for Python or Ruby, and seek out a mentor.
  5. Attend a DevOps meet-up, at least once.
  6. Make code dojos and retreats a priority.
  7. Learn TDD. (Test-driven development)
  8. Familiarise myself with a testing framework.  Using a text editor and the terminal is all well and good when starting out, but using a properly kitted out IDE is essential.
I will return to this post and add more.  Feel free to leave suggestions in the comments.

UPDATE: Some useful comments
  • Choose one that supports multiple languages: python, ruby,
  • Eventually you'll want to learn emacs or vim, buth these can wait
  • Many of these are combinable: 1 + 2 + 3 + 7

Thursday, October 20, 2016

Turning An Array Into A String on PHP

Consider this ugly piece of code:
// Checkbox handling
$field_33_opts = $_POST['field_33'][0]." ,". $_POST['field_33'][1]." ,". $_POST['field_33'][2]." ,". $_POST['field_33'][3]." ,". $_POST['field_33'][4]." ,". $_POST['field_33'][5]." ,". $_POST['field_33'][6]." ,". $_POST['field_33'][7]." ,". $_POST['field_33'][8]." ,". $_POST['field_33'][9]." ,". $_POST['field_33'][10]." ,". $_POST['field_33'][11];
Doesn't this look better?
// Checkbox handling
$field_33_opts = implode(" ," , $_POST['field_33']);

Wednesday, October 19, 2016

Hello, World: DevOps Is My Mission

Hello, world.

My name is Alexander Garber and my mission is to become a software developer. On this blog I will share with you my journey into this exciting and complex profession.

Why DevOps?


This is my road map to Destination DevOps, which you can expect to be updated frequently:

  1. My dream is to work in a Linux environment.
  2. I have a deep interest in open source software.
  3. I love making processes more efficient.
  4. I love automating processes.

So DevOps seems to be the best fit.

How Will I Get There?


This is my current career road map.  In short, over the next 5-10 years:
  1. Study coding and reach out to prospective employers.
  2. Get an internship or a junior developer position.  Work very hard.
  3. Become a successful software developer.  Work even harder.
  4. Become a DevOps engineer.  Redouble my efforts.


SAMPLES OF MY RELEVANT WORK:


CURRENT ENDEAVOURS WITH THE VIEW OF WORKING IN DEV-OPS

My approach, in consultation with people involved in the industry, is to familiarise myself with the tools favoured by DevOps engineers and to solve the kinds of problems, on a small scale, that these tools are intended for.  The following is a summary of the ground I have covered since 1st July 2016.

  • Get Chef running on my Ubuntu 16.04 computer at home
  • Make advances in Vagrant with Virtualbox and AWS
  • Manage EC2 instances, Security Groups, IAM profiles, etc, in AWS.
  • SSH into EC2 instances on AWS.
  • Upgrade an Ubuntu Server from 14.04 to 16.04 over SSH.
  • Build a LAMP stack on an Ubuntu Server EC2 instance.
  • Automate routine activities on the computer by means of Python and BASH scripts.
  • Build a LAMP stack on a NAS drive, install MediaWiki, and configure a fully functional locally hosted wiki, with a collection of useful plugins, on which I document all the business processes and procedures.
  • Compile source code, including recompiling the Linux kernel.

PERSONAL BACKGROUND IN LINUX AND OPEN SOURCE SOFTWARE

  • Contributed source code in Python to the OpenShot project.
  • Member of Linux Users Victoria and attended many meetings.
  • Have run workshops for OpenShot Video Editor.

WORK HISTORY AS AN I.T. PROFESSIONAL

  • Started a computer repair and IT service business, Clockwork PC in 2011.
  • Built up a client base of 62 clients, and am still sought after for my services.
  • Utilise my computing knowledge to automate as much of my daily work as possible.

UPCOMING AREAS OF STUDY

The following is a list of areas that my research suggests would be most useful to learn or improve in.  Is there anything you would add to it, or subtract from it?
  • Ruby
  • Ruby on Rails
  • Chef
  • Puppet
  • Docker
  • Openstack
  • Juju
  • MySQL
  • PHP

1,050 hours

It took me 13 working days to complete my first 100 "work" pomodoros as a Junior Software Tester at Profectus Group.  Much of ...