Skip to main content

Posts

Adventures in Python and unit testing

In the last month (due to a project at work), I had the opportunity to level up my Python. I think it got to the point where I figured out the terms to search for to pull up Google's foo.bar contest. :) And not only did I level up my Python, but also I finally witnessed how useful unit tests are. This really isn't a writeup about the merits and necessities of writing unit tests so much as it is a declaration what I've learned firsthand. At the beginning of my career, my manager handed me a book about test-driven development. Intimated by junit and the codebase I was jumping into, I flipped through the book but didn't glean much from it. Eventually, I forgot about it, and writing unit tests never became part of my development workflow during the first many years of my career. And that book is probably still collecting dust on that bookshelf in my cubicle, to this very day. After joining a company where unit tests are taken very seriously, I had to bite the bullet and...

Learning from mentors

Over the last year, I've tried to force myself to find people with whom I can ask questions about career growth. It's been a common pattern of mine since my college days not to ask questions but try to figure out the answer on my own: a noble thing to do and a nice learning journey, but time consuming and narrow-sighted, not to mention ego-driven. I would chalk it up to being shy, but in reality, I was too arrogant to ask for help because I thought it gave me extra bragging points if I could figure it out myself. Needless to say, this led to increasing frustration as I began to take on more difficult concepts. I try not to live with regrets, but if there's one thing I could redo, it would be my whole approach to college. Of course, after failing to find the answers I needed in my coursework and job functions, I had no choice but to find people and ask questions. But one of my main blockers to asking more  questions was not knowing how to ask questions . "I don't ...

Jetlag in January

I just returned from a short trip to Taiwan with family and it was fantastic. It's always been a dream of mine as a kid to visit Taiwan, and even in the fast 8 days I was there, I felt like I experienced a lot. Of course, it was only the tip of the iceberg. Next time I go, my Chinese will be better and I will stay longer. During the last week, I was able to finish reading "The Looming Tower" as well as "Steve Jobs". Both were fascinating books and I was really glad I could finish both. Wasn't expecting to pick up "Steve Jobs" but the library didn't have "Peak" available. I also left my laptop at home (first time ever, for vacation) -- it was really weird, but I didn't feel comfortable traveling with either a heavy laptop or my work laptop. A few thoughts about what I'm trying to reach for this year in terms of technical skills: 1) I'm currently reading through OSTEP  and going to try and finish it (and the codelabs) ...

December goals

Goals, goals, goals. Where have you gone? Since I last wrote about goals, I've started working on a new team and have been working on a ton of new things. I totally missed these goals by miles: 1. Android? I've done some stuff in Java, but definitely not Android. 2. C? Nope, unfortunately. 3. Golang? Sadly, none. But, I've gotten to do a lot of other things that I thought I'd only dream of doing, including (and not limited to): 1. Running several times a week. Max mileage has been about 6.5 mi in one session at Lake Chabot! This is a BIG BIG BIG thing for me because I've never pushed myself harder than now in running. 2. Learning reverse engineering. I will try to start blogging about it. Probably in another blog. 3. Still reading, slowly going through "The Looming Tower". 4. Contributing to open source with actual code. :) So, apparently I'm really bad at setting and achieving goals. In the next month, I plan to: 1. Finish my curren...

NP-sad

I think this is a manifestation of my lifelong fear^H^H^H^H journey to understand algorithms better. I had a dream that I was talking to my nephew about algorithms and he called NP-hard problems "NP-sad". Needless to say, I was thoroughly amused and proud of him, and I kept reminding myself in the dream to remember the content of our conversation. Then I woke up to my alarm clock, and the only thing I could remember was what I just chronicled. I feel NP-sad.

Bash stuff I should've learned before

I wanted to grab some variables from an xml and parse them into environment variables. After some googling around, I found my answer: Use xmlstarlet to pull the name/value pairs Then use sed to combine them into "name=value" format Then use a while loop with process substitution It ended up being something like #!/bin/bash while read -r line; do   # do some stuff to parse the line   # ...   printf -v $varname "$varval"   export $varname done <<< "$(xmlstarlet sel -t -m "[xml selections here]" -v . -n <[xml file]  | sed 'N;s/\n/=/')" Yay so cool.

Goal smashing and missing

August and September were weird months due to some things happening at work. It's pretty much settled down now, and I will be working on some exciting new things. First off, I didn't hit any of my goals for C or golang projects. However, I did continue working on my small Android project (simple todo list). I'm making really slow progress on it since I spend just one evening per week (or something like it) on it. I've also been making really slow progress on my image processing online class. I've only been spending about an evening per week on it as well. In August and September, I've finished Originals: How Non-Conformists Move the World  (Adam Grant) and Outliers: The Story of Success  (Malcolm Gladwell). I just started Alice's Adventures in Wonderland  for some lighter reading. I also started a class on binary exploitation with a colleague. Kind of going slowly through it, but I am getting more comfortable reading assembly and using gdb. In the m...