How to be a Hacker


In [1]:
from IPython.display import HTML

Intros


In [2]:
print('Hello')


Hello

I'm Faris, and I am a hacker.

I didn't take AP Computer Science in High School! gasp

What is a “Hacker” anyway?

What most people think of when they think of hackers.

The illegal / illicit activities.

But in reality, this is a hacker as much as a car-jacker is a car mechanic.


In [3]:
HTML("""
<div style="width:100%;height:0;padding-bottom:56%;position:relative;"><iframe src="https://giphy.com/embed/eCqFYAVjjDksg" width="100%" height="100%" style="position:absolute" frameBorder="0" class="giphy-embed" allowFullScreen></iframe></div><p></p>
""")


Out[3]:


In [4]:
HTML("""
<div style="width:100%;height:0;padding-bottom:56%;position:relative;"><iframe src="https://giphy.com/embed/RPwrO4b46mOdy" width="100%" height="100%" style="position:absolute" frameBorder="0" class="giphy-embed" allowFullScreen></iframe></div><p></p>
""")


Out[4]:

hacker: n. A person who enjoys exploring the details of programmable systems and how to stretch their capabilities, as opposed to most users, who prefer to learn only the minimum necessary.

Are you a read-only user? Or a read-write user?

Hacking might be characterized as ‘an appropriate application of ingenuity’. Whether the result is a quick-and-dirty patchwork job or a carefully crafted work of art, you have to admire the cleverness that went into it.

Hackers hate the boring stuff

This is a chicken and an egg problem. Do we code because we're lazy, or does coding make us lazy? We're trying to make the machine do the work for us, but we constantly end up refining our processes to the point where it would seem that we're past the point where coding actually saves us any time...


In [11]:
HTML("""
<div style="width:100%;height:0;padding-bottom:75%;position:relative;">
<iframe src="https://giphy.com/embed/1b7C0msGxlBSM" width="100%" height="100%" style="position:absolute" frameBorder="0" class="giphy-embed" allowFullScreen></iframe></div><p></p>
""")


Out[11]:

“An Appropriate Application of Ingenuity” (Is it worth the time?)


In [4]:
HTML("""
<img src="https://imgs.xkcd.com/comics/is_it_worth_the_time.png" />
""")


Out[4]:

Something every coder should consider is if they're actually saving time by utilizing an automation.

If you find yourself repeating things, automate it!

Personal Examples


In [5]:
HTML("""
<img src="imgs/scripts.png" />
""")


Out[5]:

Let's peak inside one of those scripts!

,timelapse_it.sh

#!/bin/sh
mkdir $1;
for i in *.CR2;
    do darktable-cli $i ./$1/$i.jpg;
done &&
cd $1 &&
./timelapse-deflicker.pl &&
cd Deflickered &&
ffmpeg -r 29.97 -f image2 -pattern_type glob -i "*.jpg" -vf scale=1280:-1,format=yuv420p -vcodec libx264 $1.avi &&
./noaudio_html_optimize $1.avi $2
# && rm $1.avi

This is pretty much a verbatim script from my personal dir (you can find the others in my github account). I used it to create a timelapse for a series of images. I found myself typing in the commands over and over and ended up saving them into a file.


In [6]:
HTML("""
<video src="imgs/timelapse.mp4" loop autoplay controls>

</video>
""")


Out[6]:

Life Lessons — Things I wish I had known when I started

Document as you go!

No one person knows how to create a mouse from scratch.

Learn markdown and html

These are the standard languages of the web now. Linking is important

Learn git

If you haven't learned git, you should. It's better than file_v1, file_v2; etc (Show the github)

Share your knowledge with others!

Stand on the shoulders of giants! Bonus: recruiters love this.

  • blog it!
  • go to meetups!

In [7]:
HTML("""
<img src="imgs/meetup.jpg" />
""")


Out[7]:
  • go to conferences!

In [8]:
HTML("""
<img src="imgs/conference.jpg" />
""")


Out[8]:
  • Scripts I've written
  • Document as you go: learn markdown & html
    • share that knowledge with someone!
      • blog
      • meetups…
      • conferences
  • Learn the command line
    • learn linux
  • Don't code for coding's sake: solve a real-life problem

Learn the command line!

Your computer is a tool. The best way to interact with it is directly!

Learn Linux


In [9]:
HTML("""
<img src="https://upload.wikimedia.org/wikipedia/commons/3/35/Tux.svg" />
""")


Out[9]:

Unlike other operating systems, Linux is built from the ground-up to be open. You can pop open any file and see how it works

(It's harder to read code than write it)

So: Read Code!

Write code!

Solve a problem you care about.

Code is for people

Thank You!

Come to a meetup! meetup.com/SLCPython

github.com/octaflop