Menu

Jerico Aragon

Getting better at vim will give me nothing. It will not get me closer to any goal I have now.

So this is my simple observation: When deciding to embrace a self-motivated ambition, choose a definition of success that your aunt in Peoria would understand and find impressive. This is not about succumbing to the status quo, but instead setting yourself up to receive the brutal but useful feedback needed to eventually start producing things too good to be ignored. – Pursue Metrics that Matter, Cal Newport

I’ve been thinking of making my workflow vim-centric again, just because.

Then this got me thinking:

Getting better at vim will give me nothing. It will not get me closer to any goal I have now.

PhpStorm works perfectly fine. It’s heavy, yeah. But so what? My machine can handle it pretty good.

Ewan ko ba bakit na attract ako sa idea na of “get better” at vim. It does not provide value. What I mean is, the effort I will put in it does not convert to something of valuable.

Pursue metrics that matter. Getting better at vim does not matter. Getting better at coding does. Better yet, getting better at achieving goals that improves my life is the thing that truly matters.

Focus on getting better at creating things instead.

Debugging

I enjoy understanding how other people code.

I’m not the type who bash at other programmers just because our “way” of thinking doesn’t align (most of the time).

Reading other’s people code and doing something about it is like stepping in someone else’s shoes. I asks all the why’s. Why did he do this, why did he do that. I try to think like the person who coded the thing.

Best practices are there for specific scenarios. There are no universal best practice. Early bird does not apply on going on a field of landmines.

The more “way” I know the better I get at choosing what’s the best for the situation.

This is why I’m getting paid by the premium. It’s because of the different “ways” I tried before and the lessons I learned from them and knowing which is the best for this specific situation.

Relaxed approach when coding

To conclude, programmers work at night because it doesn’t impose a time limit on when you have to stop working, which gives you a more relaxed approach, your brain doesn’t keep looking for distractions and a bright screen keeps you awake. — Maker’s Time

I code better when I’m relaxed. When there’s too much to think and worry about, I just can’t function properly. Most of my background processing are spent on worrying.

Note to self: have enough time to play around while coding. That way, you enjoy the actual work.

Fixing bricked Cisco E3200 router

My kind of play is fixing stuff. I would not mind spending a lot of time figuring out how something works and see what can I do about it.

There’s this broken router that can’t boot due to corrupted firmware. Searching online, the solution was only to pry it open and connect to it via serial. Stop the boot process and upload a new firmware using  TFTP.

The hardest part was finding USB to UART (Serial TTL) Converter. I found e-gizmo shop just at Taft Ave, Manila selling one.

I also have no idea how to solder, I just asked our electrician friend to do it for me.

Once everything is prepared. The whole process sums up to:

Download the following

Connect USB to UART Converter to the router’s serial interface.

Only GND RX TX needs to be connected. Router’s RX goes to converter’s TX. Port information are available at OpenWrt’s wiki.

IMG_0369-cropped

Connect PC LAN to router.

Configure PC’s static IP address to 192.168.1.2 with subnet 255.255.255.0

2014-10-23 18_43_31-Internet Protocol Version 4 (TCP_IPv4) Properties

 

Prepare TFTP Client

But do press the Upgrade button yet.

2014-10-23 18_45_15-Upgrade Firmware

 

Configure PuTTY.

Make sure the serial line is correct. You can see it in the Device Manager.

Speed: 115200, Data bits: 8, Stop bits: 1, Parity: None, Flow control: None

2014-10-23 18_46_30-PuTTY Configuration

Plug the router and press Ctrl + C as the router is starting up.

You should get a CFE> prompt.

2014-10-15 03_04_01-COM3 - PuTTY

Type these commands

CFE> nvram erase
CFE> flash -ctheader : flash1.trx (Press updrage in TFTP client right after this one)
CFE> go

go

Visit http://192.168.1.1 in your browser.

After the process is done.

2014-10-15 03_31_17-[TomatoUSB] Status_ Overview

And it’s workingggg! Haha fun stuff.

Helpful links:

Create new Bitbucket repo on command line

My usual process when starting a new project in web development is to

  1. Create a new private repository at Bitbucket
  2. Add the remote url to my local repo
  3. Git push to remote

This involves a lot of context-switching by using a browser, remembering logins, clicking and copy-pasting stuff. It adds a lot of friction when starting a new project.

I decided to scratch my itch, make the process easier. I created a batch script that’s aliased to bitbucket command. It will ask my username, password, and a repo name. After that it creates it using Bitbucket REST APIs and adds the resulting repo to the remote of the current git repo.

It’s much simpler than it sounds haha. Here it is:

[gist id=6687a9676dedd47698a7]

Now I just need to type bitbucket and answer the prompt and the code will be ready to be pushed to it’s own repo. :)