Week 4 at Recurse Center

Day 1: Labour day holiday. Was out most of the day. No work.

Day 2: Got the first cut of a toy information retrieval system working. Calling it NoteRanger. I started reading the book here. I started taking notes in mark-down following the suggestions made by David. I also took his search-the-notes system. But I am generating the index in C++. For now I am using his JS code to query, but I plan to write my own version there as well.

Did warm-up today, did code-dojo today. Ivo explained briefly how he wrote an IRC server to me. Continuing the Hardware Software Interface course for the third day today.

Day 3: I don’t remember what I did on day 3! (Note to self: That’s why it’s so important to blog everyday) Except that a few of us went to the Drunk Ted Talks on Conspiracies after RC and it was quite funny.

Day 4: Took the day off as I was not feeling well. Worked a little on NoteRanger. Made the search result show the header information and made the NoteRanger a github page. Also resumed working on BitFunnel. Tried following the instructions mentioned at the BitFunnel blog.

Day 5: Wrote an AND query in NoteRanger. Jake reviewed the html and js code and gave very good feedback. Now the static part is separated from the dynamic part, the js code looks much more readable and the bug that the form was getting submitted only on click has been resolved. Watched floating point representation from Hardware Software Interface course. Am not sure that I could understand it well. Need to dig that little more.

Week 4 at Recurse Center

Week 3 at Recurse Center

Day 1: Start with the dropin warmup. Can think of an inefficient solution (O(n^2)). Want to do better, hence start understanding how to build a suffix tree. Spend almost two hours without understanding fully how to construct a suffix tree. Need to find a good tutorial on Ukkonen’s algorithm.

Start working on BitFunnel again. Download a Wikipedia database dump file. Process it with Wikiextractor script and then BitFunnel WorkBench, so that it can be fed to a BitFunnel executable. The idea is to ingest one such database dump and measure the performance. The IngestAndQuery executable in BitFunnel hasn’t yet implemented the ingestor call. The next task is to have IngestAndQuery ingest the documents.

Finally, the big day is here. Gerald Sussman spends the entire day at RC and gives a talk on flexible systems in the evening. A mere thirty minutes is less for the material he presents but more than thirty minutes long question and answer session kind of makes up for that.

Day 2: Start the day with pair programming with Ivan on his REPL for BrainFuck. Quickly discuss yesterday’s warmup problem which has the problem of finding the consecutive three letters appearing most frequently. My solution is to solve it using a Suffix Tree. But Ivan uses sliding window approach where he hashes every three letter in the sliding window and keeps a count.

Try to understand how the Ingestion works in BitFunnel.

Pair with Miguel on his Makefile

Pair with Andrea on the Code Dojo problem which is this HackerRank problem.

Day 3: Was distracted. Did the dropin warmup. Wrote fizzbuzz using template meta-programming for the first time. Tried to ingest a Wikipedia database dump using BitFunnel.

Day 4: Pretty much the same. Was defocused. Did the dropin warmup in the morning. Made some more notes on Makefile. Started learning about Information Retrieval system. Ended up staying late for the Arts and Crafts night at RC. Made some fridge magnets and a doodle.

Week 3 at Recurse Center

What I am going to work on at RC (v1.0)

This is almost the end of week 2 at RC. And after much deliberation on my side and discussion with James (one of the facilitators at RC), here are my goals v 1.0 (To have the scope of them evolving even more) –

1. BitFunnel – I am going to keep on contributing to the open source text based search project. It’s in C++. Although contributing to an open source project was quite down below on the list of possible things I thought I would do at RC. But this project has a few things that got me hooked.

First, text-based search is quite an interesting area with the scope of learning new algorithms and tricks. Performance is an important factor in the field. Second, I get to work with two very experienced programmers. Third, since it’s in C++, I only have to learn about the domain without worrying about the programming language I am going to use in this project. And as an icing on the cake, it’s using C++17 which is something I always wanted to do.

2. Writing a graph partitioning library in Haskell. I worked on an FPGA prototyping tool in my last company and we used some very cool graph partitioning algorithms to partition the SoC designs. I always wanted to understand the algorithms and implementing some of well known algorithms like Kernighan-Lin, Fiduccia-Mattheyses looks like a good way to understand them.

I want to first implement them using C++, the language I am currently most comfortable with and then in Haskell, the language I am learning at present. Eventually I want to write METIS in Haskell.

And I want to end this post with the most important lesson I learned today. And that is – don’t worry too much about not having something cool and extra-ordinary built at the end of RC. Don’t worry too much about not making the best use of your precious time here at RC. Enjoy the process of learning and working on something which you are enthusiastic about. Meet and talk to the people in the RC community. There are some really cool and smart people here at RC and there’s so much to learn from them.

Have fun and never graduate!

What I am going to work on at RC (v1.0)

First 3 days of week 2 at the Recurse Center

Here’s my lazy summary of the first three days of week 2 at RC.

Day 1: Continue working on BitFunnel. By working, I mean trying to integrate a piece of old code into the new codebase. My goal is to gain an understanding of how a text-based search engine works.

Submit the first challenge for Haskell at Exercism. Discuss the second and the third problem with Katherine. Have started to get a little bit bored with Haskell too, specially I am not sure what I am going to build with Haskell.

The best part of the day is the talk by Emil Sit, the resident for next two weeks where he gives a very high level overview of the distributed systems and shares his experience.

Feeling: Worried over what I am going to work on at RC.

Day 2: Fix build errors and unit test failure in integrating a small component from the old BitFunnel code to the new code base. Spend some time understanding the data structures used. Also spend some time reading up basic ideas in text-based search. BitFunnel now has started to become interesting!

Spend one hour in reading up Haskell and solve the second challenge on Exercism.

Attend code dojo and pair with Cihan to solve the Euler Project problem 35 in Python. You have to find circular primes and as it turned out most of the people implemented the sieve of Eratosthenes to find out prime numbers in range.

Feeling: Still searching for what I am going to work on at RC.

Day3: Solved two problems in today’s Dropin Warmup. Dropin Warmups are daily one hour sessions where Rose, one of the facilitators, writes down two programming problems. The problems and my solutions to them are here.

Read a some more Haskell. Now I know currying, higher order functions, map, filter, lambda etc.

Started implementing the Kernighan-Lin graph partitioning algorithm in C++ and eventually I want to do it in Haskell.

Went to the New York Haskell Meetup group’s presentation on Concurrent Bloom Filter. Could grasp some of the Haskell code which felt nice.

Did the third challenge of Exercism.

First 3 days of week 2 at the Recurse Center

Week 1 at the Recurse Center

Here’s my lazy summary of the week that flew by at RC(I am going to refer to Recurse Center as RC from now on).

Day 1: Introductions and overwhelmingly more introductions. Hi’s and Hello’s to the people in my batch or from the previous batch, trying to remember the names. The speed-friend-dating was fun where a script generated random pairs of names and the owners of those names in a pair are supposed to talk to each other for five minutes. Good exercise to talk to new people in a short span of time and find out about the interesting stuffs they are planning to do.

Day 2: I get used to my new life in New York. I meet Dan Luu. Well, hang on… is it the day 1 or day 2?! Hm. Never mind that. He is working on BitFunnel – which is an “experiment in text search/retrieval”. It’s in C++ and they are using C++17. And I sign up delightfully. Although this was not in my plan to write C++ during RC, but it sounds a nice project with the scope of getting good knowledge about C++17 and the text search algorithms. I was working in C++03 in India.

Day 3: Go to the Haskell group meeting. Install stack and GHC using brew. Start reading the book Learn You a Haskell for Great Good. After lunch, fix some minor build errors (that was coming only with g++, not with VC++ or clang++) in BitFunnel. Dan tells me a little about the code in BitFunnel to get me started in one of the pieces. We pair for some time to integrate a component from the old BitFunnel code. Go to a Web Development 101 workshop later.

Day 4: Went to the Dropin Warmups where Rose writes down two problems which are supposed to be solved within 30 minutes. Started working on a problem of PlusOne. Here’s the problem –
“Write a function plusone which takes a string as an input and increment all the integers in it by 1”. Here are some examples –
1. ab45 => ab46
2. 1 + 14 = 15 => 2 + 15 = 16
3. “The value of pi is 3.42” => “The value of pi is 4.42”
4. “Call me at 235-813-2134” => “Call me at 236-812-2133”

In the second half, Dan talks to me about the interesting problems they are trying to solve at BitFunnel to give me an idea about the project.

Day 5: I was struggling with Mac a little as my development experience has been on Unix only. I was not comfortable with the default terminal in Mac OS. Dan told me about iTerm2. I install iTerm2 and immediately love using it. Specially the Unix-y copy-paste is a big plus since I always forget doing a Command-C to copy a text on Mac OS.

He also told me about tmux. I install that as well and guess what! I love it too! tmux is a windows manager. I had known about Screen but never paid much attention to it due to my own laziness. Spend most of the day installing these and configuring these tools and learning the key shortcuts to use these tools. The next goal is to install Spacemacs and get better at using emacs.

Then I spend a little time on continuing learning Haskell. Write a few basic programs like factorial to get started. Start with the first challenge on Exercism.

Goal for next week
1. Continue on to my second week on learning Haskell
2. Complete the integration of the component in BitFunnel
3. Write blog entry more frequently than once a week.
4. Find out what to work on for my own project at RC. A few interesting things came up this week. Let’s see what do I pick.

Week 1 at the Recurse Center

A New Life as a Recurser

First a few updates. I left my job as a software developer at Mentor Graphics in India. I have moved to the USA. And I have been accepted to attend the Fall 1 batch at Recurse Center. I am going to spend my next three months here. It’s an educational retreat for people who want to get better at programming.

I have been working on building various verification products for the Semiconductor industry using C/C++ on Linux. I wanted to learn some new stuff which include –

1. Functional programming
2. Distributed computing
3. Machine learning
4. Database and scalable systems

Three months are not enough to be an expert in all four of the above. And I haven’t yet decided what I am going to build during my time at the Recurse Center. For now, I plan to learn a functional programming language and build a system/library with it.

A New Life as a Recurser