Saturday, March 4, 2017

My Experiences as a Beginner Woodworker (, , ,)


Woodworking takes time! It’s not something that can be rushed or perfected on the first try. It requires practice and learning from your mistakes. In the end, you end up with a beautifully crafted object that you can call your own. 

The experience of creating something out of nothing is extremely rewarding.

The experience of creating something out of nothing is extremely rewarding. That’s also one of the reasons whyI love computer science. The fact that I can create something that can reach millions of users. 

I began my journey into woodworking a few days before my sister’s birthday. As I tend to do with most birthdays, I start thinking of what gift to get a couple days before hand. My sister recently started getting interested in the startup culture and began watching Silicon Valley. When you combine these interests together, you get your sister a 1 month subscription to HBO… hiding the fact that it was just a free trial. 😜 

Only joking! This is where the three commas (, , ,) come in…

Three Commas Club (THrē ˈkäməs kləb)
Three commas to imply a billion dollars as $1,000,000,000 has 3 commas. To be in the three commas club is to be a billionaire. [source]

I wanted to get her something that represents the three comma club, pushing her to achieve her entrepreneur focused goals. While there are many t-shirts and paintings of three commas, I set out create them out of wood. Something that can be placed on her desk of her future unicorn. 🦄 

It’s Woodworking Time!

Sketch It Out

When you get started, you have to have a sketch. Whether it’s on a napkin or a sheet of paper, get your ideas down in some physical form. It’s difficult to create something from scratch when it’s just in your head. 

The same can be said for software engineering. You have to create a rough architecture diagram so you have a reference point.

I started by sketching on a sheet of paper and moved on to creating a digital version of it:

three commas sitting on a base

Drawing a large comma on a sheet of paper is actually harder than I thought. It was easier to create a digital version of the sketch since I could work off a preexisting image of a comma.

I used Sketch to design my digital commas and worked off of an image from TheNounProject.

Technically yes, the sketch above would not be physically possible due to the center of gravity being located towards the right. The comma would just fall/roll over on it’s side. I ended up using a different edge for the base in my final designs. However this was still an issue and had to update my designs to take that into account. (will get into this later)

My Setup

Unfortunately I did not have an official wood working table. I ended up using an old plastic picnic table. It was not ideal but it got the job done.

Initial Tools & Materials 

Also, if you are me, you have almost zero materials for working with wood. There’s many different opinions on how to get started but this is what I did.

I bought a cheap jigsaw ($30), two clamps, and sandpaper (60, 120, 220 grit). I already had an extra table to work on but make sure you have a good flat surface where you can easily clamp your wood to.

If I had known about jigsaw blades earlier, I would have bought a separate set of jigsaw blades when started this project. Not all blades are alike. Some blades are good for curved cuts, others are good for smooth cuts, and etc. The jigsaw comes with a default blade.. which gets the job done. However the blade specifically for curved cuts was phenomenal. It was easier to direct the jigsaw around curves and it usually came out with a smoother finish.

I’ll have information about what materials and tools I used scattered throughout this post. To see a complete list and additional details, scroll to the end.

Start with Practice Wood

If you have never worked with wood before, get some practice wood from Home Depot or Lowes. I started out with a 2in x 4in x 8ft block of pine wood ($5). 

Pine wood is extremely easy to work with since its soft wood that can be easily shaped. It also helps that its extremely cheap. Check out this site for more information on pine and other kinds of wood: link.

Initial Cuts

Begin by drawing an outline of your designs on the wood. Preferably with a pencil. Unfortunately, I lacked the insight and used a sharpie :/

Use the jigsaw to make rough straight cuts. Going in straight lines made it easier than going around curves. I made many passes and continue shaping down to the outline over each cut.

As you can see above the cuts are very rough. However it is possible to get somewhat of a finished look if you can work carefully with a jigsaw. The blades made for doing curved cuts will help a lot towards getting that finished look. Which is what I ended up using for my final pieces.

Try to get a hang of the jigsaw when using your practice wood. Also sand it down with sandpaper and the dremel to get a feel for the tools & materials. You want to have a good idea of how to cut with a jigsaw and sand with a dremel before you move on to your real wood. 

Creating the Commas

After I had gotten a hang of the tools on pine wood, I moved on creating to creating my commas out of oak. I used oak because it was an easy to work with hard wood that has a more premium look to it. I also wanted it to be stained and not painted. 

Unfortunately the oak did not come in 2in thick wood, which is how thick I wanted my commas to be. So I ended up using two 1in pieces and glueing them together. 

As I did with pine wood, I started off outlining the designs on the wood. Again, do not eye ball this as a beginner, these are your reference points.

Entire Cutting Process

Just to understand the entire cutting process, this is what it looked like from start to finish.

  1. Creating the sketch
  2. Drawing the outline
  3. Cutting along the outline
  4. Glueing two pieces together


After cutting each comma piece, I applied wood glue on both of the pieces and clamped two of them together. I believe the wood glue says to wait for 60 mins but I left it for a few hours.

Make sure the glue comes out the sides and wipe it clean. This way you have a clean edge and no gaps between the two commas. However, do not fret if there are gaps, you can use wood filler to fill it in. 

After glueing them together, I had to use the jigsaw again to get the two pieces flat and lined up properly.


After cutting/glueing, I sanded down the wood. However I wished I had sanded after I applied the wood filler. Mainly because I had to sand another time.

When sanding, start from an extremely coarse sandpaper (60 grit), then move on to finer sandpaper. So I sanded the commas with 60 grit, then moved to 120 grit, and then finished with 220 grit.

I thought I could sand with the dremel but I did not realize the dremel was for sanding smaller areas and touching up finer details. I ended up sanding by hand and finishing with the dremel. The dremel was used to sand the inside curves of the commas as that was not easy to do by hand. However, you could buy belt/disk/orbital sanders to sand larger pieces.

Touching Up

As I said, I used wood filler to fill in any gaps between the wood and any mistakes that happened while cutting. The specific filler I used was Plastic Wood 3 oz. Natural Latex Carpenter’s Wood Filler.

It does look a little rough, however you can sand it down after it dries. In addition, if you get the natural colored filler, you can also stain right on top of it.

Staining Wood

I chose to stain the wood instead of painting it. Mainly because I wanted the wood grains to show. 

I used Red Mahogany Wood Stain.When picking out a wood stain, make sure to ask to see the stain samples. You can get a good idea for how the color dries on wood.

I cut up an old white cotton t-shirt and used that to stain the wood. I won’t go into how to stain the wood as the instructions are right on the can. Just make sure to be in an well ventilated area as the smell is pretty strong.

This took the longest as I had to stain each side and wait for it to dry a couple hours before I could apply another coat.

Staining Wood (Problems)

Unfortunately some of my wood stain dried in blotches/patches. See below.

I could never figure out why this actually happened but I do have one theory. The instructions on the can state that you should apply the stain, wait for it to soak in for a few mins and then wipe of the stain completely. Maybe I had applied or wiped off the stain unevenly. With this theory in mind, I tried staining only the blotched areas again but that did not do anything.

A suggestion from the Home Depot associate was to use pre wood stain conditioner as this would allow for wood to be stained evenly at all times. However this required sanding/removing the current stain and then re-staining. 

Unfortunately I did not have enough time to do that, so I ended up using a Red Mahogany Blend-Fil Pencil to fill in the blotched areas. Ideally, these should be used for touchups. They do not work well for large areas. In my case, the blotches still existed but the pencil made it less noticeable.

TK(wood-stain-blotches-1-img and woodstain-blotches-fixed-img)

Top Coat

After the stain had dried, I applied a topcoat (polyurethane, semi gloss) for a layer of protection and gloss. The stain layer also felt a little unfinished so the topcoat helped give a more smoother feeling to the commas.

Building the Base

I used some extra oak wood that I had to build the base. The base was pretty straightforward; it’s a plain block of wood. I wanted to add some depth to it so I used the router bit on the dremel on the edges of the wood.

I was free handing it so it was difficult to get a straight even cut all the way across. If I had something to rest the dremel on to get that even cut, it would have come out better. 

After cutting and sanding the base, I moved on to staining it with a lighter stain. Luckily the stain didn’t dry blotchy as it did for the commas.

I finished off by applying a layer of topcoat to the base as well.

Sitting the Commas on the Base

Getting the commas to sit on the base on its own was difficult. The commas would roll over as the center of gravity was toward the right.

There are a few solutions to this but in the end I used 1in circular magnets on the bottom of the commas and on the base.

To fit the magnets, I had to drill holes using fornester bits on both the commas and base and used gorilla glue to glue the magnets inside the holes.

Like I mentioned, there are other solutions. One could secure the commas/base permanently by using screws/nails. However I wanted the commas to be removable and re-postionable. TK(fix word)

Finished Commas & Base

All in all, everything somehow came together. The magnets worked perfectly to hold the commas on the base. The stain showcased the grain beautifully (disregarding the blotchy areas). We also baked a three comma cake since this was for my sister’s birthday.


materials that I used, see below for more info
  • Pine (Regular & Premium) and Oak
    Used pine for practice. Moved on to premium pine and oak for the final object.
  • Sandpaper (60, 120, 220)
    It’s recommended to start with a lower grit sandpaper and gradually move on to higher grits. 
  • Wood Glue
    My oak wood was 1 inches thick but I wanted my commas to be 2 inches. I ended up cutting two commas and glueing them together.
  • Wood Filler
    Had to use wood filler to fill up mistakes while cutting.
  • Wood Stain
    This is stain. Not sure what else can be said about stain. Make sure to use this in a well ventilated area.
  • Blend-Fil Pencil
    The stain came out blotchy and patchy on two commas. Not sure why. The home depot guy recommended to use pre wood stain conditioner next time. The Blend-Fil Pencil is like a crayon on which you apply onto small imperfections. It didn’t work perfectly in my scenario.
  • Topcoat (Polyurethane, Semi-Gloss)
    Top of the mornin to you lads. Finishes your wood. Adds a layer of protection and gloss.
  • Magnets (0.5 in diameter)
    A magnet was placed on the bottom of the comma and on the base. This allows for the commas to stay upright.
  • Gorilla Glue
    Gorilla glue was used to glue the magnet to the hole/base.


tools that I used, see below for more info
  • Black and Decker Jigsaw
    A cheap $30 jigsaw. Good for rough cuts on wood.
  • Additional Blades for the Jigsaw
    The jigsaw comes with a blade however I had not known that there different types of blades for different functions (e.g. cutting on a curve or wanting a fine finish). So if you are looking to do any complex curved cuts, get the blade for curved cuts. I found this out a little late but it helped me tremendously!
  • Clamps
    Again, not too much to say about clamps. Just make sure to get one to hold your wood in place while doing the cuts.
  • Dremel 4000 + Sanding, Carving, and Routing Bits
    Good for finishes. However not for large jobs. I ended up sanding most of it by hand. Only the inside of the commas I sanded using the Dremel. 
  • Putty Knife
    Used this to apply the wood filler. You could also do this by hand but you will get a smooth application if you used this.
  • Lint Free Cloth/Old T-Shirt
    This was to apply the wood stain and top coat. I just used an old t-shirt.
  • Power Drill
    This was used in combination with the fornester bits.
  • Fornester Bits
    The fornester bits were used to drill flat holes in the bottom of the comma and the base.


A big shout out to…
@boland and @jmanweiler for giving me tips on how to get started!
@my dad: since I was home for the holidays, he helped out with creating the commas.
@my mom: for baking an amazing three comma cake

Monday, December 29, 2014

MagPen - A Novel Way of Digitizing Notes Using Magnets

MagPen Software

A mobile device has a multitude of sensors ranging from GPS to a barometer. One sensor that is used daily is the capacitive sensor. Capacitive sensors detect anything that is conductive and they are used for touch input in mobile phones. We rely tremendously on touch input to interact with our devices ranging from playing games to checking notifications. We also have the ability to use our finger or styluses to write notes directly on a mobile device. However, touch/stylus input on mobile devices has its own set of problems. We are unable to easily draw detailed diagrams or write notes using the touch screen.

Is there another way to provide a different method of digitizing notes with a mobile device that expands the capabilities of touch? Another sensor that can be used for alternative methods of interaction is a magnetometer. The magnetometer senses changes in the magnetic field in all three axes (x,y,z) [10]. If the magnetic field can be detected, then it is possible to alter the magnetic field by using an external magnet. When the external magnet is moved around, it will alter the magnetic field thus producing different (x,y,z) values.

MagPen Software

MagPen is a system that allows the user to digitize notes while they are written on a sheet of paper. The pen itself contains magnets or it can be an electromagnet. As the pen moves around in the area next to the phone, the changes in the magnetic field are detected and they are mapped out onto an x-y plane. To simulate an actual pen, the pen will only emit a magnetic field when the tip is pressed down. That allows the phone to only recognize actual pen inputs and not the pen movements.

To enable a richer set of interactions, the magnetic field strength can be used to control various pen attributes, such as stroke size or color. This is accomplished by moving the magnet based pen closer and further away to control the size of color.

There has been existing work in the industry that attempts to solve this problem. A few examples are Livescribe, Equil JOT, or the Wacom Tablets. This devices however require additional devices and/or special pen and paper to be able to digitize these notes. MagPen attempts to remove the need of additional devices by just requiring your mobile device and a custom pen.

To read more about this, take a look at the project writeup here.

Sunday, December 28, 2014

BicycleVis - Investigating Bicycle Fatality Patterns

Problem Description:

In this project, we attempt to understand the circumstances that make biking unsafe through our data and our visualization of it. We analyze a dataset of bike accidents across the US taken from the Fatality Analysis Reporting System (FARS). We consider time of day (which gives us an indication of lighting condition on the road), weather conditions, what part of the road the bike-rider was on (e.g. bike lane, normal road, crosswalks, etc.), and finally whether the state in which the accident occurred allows bikes to be ridden on sidewalks.

Visualization Description:

We have decided to have a three part visualization that will help us understand bicycle fatality trends:

BicycleVis Overview

The first view is an overview that shows the US average across the calendar year. This will help the user to quickly identify periods of the year where there are significantly more or less bicycle fatalities. The view also allows the users to click and drag to select a portion of the year to focus on. The selected period of the year will update the remaining visualizations to fatalities occurring during that calendar period.

BicycleVis Category Data Matrix

The second view is a category matrix heatmap with the y axis having weather conditions and the x axis having relative street riding locations. This view represents the number of fatalities in a heat map style with color coding. However, it is important to note that the data displayed is restricted to the states selected from the states control filter on the right. Hovering over any cell in the category data matrix would give the details of the cell to the user. The details would include the weather, location that the cell represents, and the number of fatalities for that combination of weather and location.

BicycleVis Category Data Matrix Law Mode

There is also a law mode feature to allow the coloring on the graph to be in red for sidewalk riding prohibited and blue for permitted. Once the user has selected the states, the user can select a rectangle from the matrix heatmap, and this will be broken down into individual state lines for the multi-line graph. Additionally, a user may select a rectangle from either axis of the category data matrix and this will show the average for the selected axis category across all the categories of the other axis in the multi-line graph.

BicycleVis Detailed Line Graph

The third view is a multi-line graph that will show the details of each selected state as an average, for the specified category of weather and riding location, during the specified calendar period. Each data point for a line represents the average number of bicycle fatalities for three hour time blocks across the whole day. When the user hovers over a line, it will highlight and show the state it represents as well as the exact value of each data point. Additionally, the US average value will always be shown for an easy comparison with a hovered over state line. Also, if law mode is selected each line will be drawn red or blue based on the state law. This will help to easily see a trend among the selected states how it compares to the average.

Basic Interactions:

  • The overview time slider as well as the checkbox control panel (to select states, weekdays / weekends) will affect the numbers displayed on both the category data matrix and the line graph.

  • Additionally, clicking on any cell in the category matrix heatmap would pull up the line graph view for that combination of weather and location which the category data matrix represents (e.g., ‘Clear’ Weather and ‘Sidewalk’ Location), and all other filters such as time, week days and state selections would also apply. The user can click on multiple cells in the matrix and one line chart for each cell shows up in the space below. Deselecting the cell in the matrix removes the corresponding line graph.

To find more about this, take a look at the project video and the design document.

Tuesday, October 21, 2014

Android 5.0 Compat Libraries

My helpful screenshot

Many Android developers have been itching to get their hands on Android 5.0 compatibility libraries to integrate it into their applications. I am working on integrating it into Spottr (a data usage monitoring application). In this post I will discuss my process of integrating Material Design and the items that the app compatiblity libraries have to offer.

Integrating Compatibility Libraries

AppCompat v21, a library that backports Android 5.0 libraries to previous verisons of Android has been released. A mini sidebar on compatiblity libraries. There are multiple android support libraries that backport a different feature sets in Android. The v4 Support Library backports the largest set of APIs (related with Fragments, Pagers, Accessibility, and much more). The v7 compatibility libraries support ActionBar APIs back to Android API Level 7 (Android 2.1). You can check out the rest of the support libraries here.

To begin integrating the support libraries, you must add them to your build.gradle file.

compile ""
compile ""

The project will need to compiled against Android 5.0 Libraries (API Level 21) to take advantage of the latest APIs. In your build.gradle file, you will need to set the compileSdkVersion to 21 and the buildToolsVersion to ‘21.0.1’. Note this does not limit your app only be compatible with v21, it just compiles against v21. The minSdkVersion specifies the lowest API that your app is compatible with.

Working with Compatibility Libraries

App Theme

To start off, we need to update the theme of the application. This would be in your themes.xml or styles.xml. Your app theme’s parent should be based off of Theme.AppCompat. In the example below I have chosen to use Theme.AppCompat.Light as my parent theme. Make sure to remove all other instances of AppTheme in your styles.xml and themes.xml files.

App Theme in themes.xml

<?xml version="1.0" encoding="utf-8"?>
    <style name="AppTheme" parent="Theme.AppCompat.Light">
        <!-- Set AppCompat’s actionBarStyle -->
        <item name="actionBarStyle">@style/BlueActionBar</item>

        <!-- Set AppCompat’s color theming attrs -->
        <item name="colorPrimary">@color/primary_color_blue</item>
        <item name="colorPrimaryDark">@color/primary_darker_color_blue</item>

In your main application theme, you will need to set the colorPrimary and the colorPrimaryDark. You can set these in your colors.xml file.

Color Attributes

App Colors in colors.xml

    <color name="primary_color_blue">#08519c</color>
    <color name="primary_darker_color_blue">#08306b</color>

Next, make sure your activities extend ActionBarActivity instead of Activity.

public class MyActivity extends ActionBarActivity

Right now if you run your application, your actionbar will be styled with the primary color. If you are testing this on Android Lollipop, your status bar will also be colored. However, this is not using the new Toolbar APIs in the 5.0 and Compatibility Libraries. It is using the old ActionBar APIs. The reason to use the Toolbar apis are to have the ToolBar directly in your layouts. This will allow developers to interact with the ToolBar as any other view, allowing animations and etc. It is also possible to set the height of the ToolBar to various sizes to follow the new Material Design Guidelines.

To implement Toolbar, some changes will need to be made within your layouts and in your activities. The layout for the default activity would look like this:

<FrameLayout xmlns:android=""
    tools:ignore="MergeRootFrame" />

It contains the FrameLayout to allow the use of Fragments in the activity. Adding a Toolbar is not complicated. Since the toolbar is now part of our view, we will have the toolbar at the top of the screen withour view elements below it. To achieve this this, a vertical LinearLayout is needed as the parent element, and the ToolBar and FrameLayout inside the linear layout:

<LinearLayout xmlns:android=""
tools:ignore="MergeRootFrame" >


	    android:id="@+id/container" />


One additional change to be made is letting your activity know that you will be using the toolbar instead of the application bar. In your onCreate method, set your actionbar to your Toolbar in your layout:

Toolbar toolbar = (Toolbar) findViewById(;

Now, when you run the application, you might get an error (displayed below). If you get these errors, be sure to set windowActionBar to false in your AppTheme. This will tell your application, you will no longer be using ActionBar and will be using your own toolbar. If your application will have a mix of ActionBars and Toolbars (which I would not reccommend), you can use different themes with different settings of windowActionBar to achieve this type of functionality.

windowActionBar error

java.lang.RuntimeException: Unable to start activity 
java.lang.IllegalStateException: This Activity already has an action bar supplied 
by the window decor. Do not request Window.FEATURE_ACTION_BAR and set windowActionBar
to false in your theme to use a Toolbar instead.
Caused by: java.lang.IllegalStateException: This Activity already has an action bar 
supplied by the window decor. Do not request Window.FEATURE_ACTION_BAR and set 
windowActionBar to false in your theme to use a Toolbar instead.


<style name="AppTheme" parent="Theme.AppCompat.Light">
    <item name="windowActionBar">false</item>
Toolbar Shadow

Unstyled Toolbar

  Unstyled Toolbar

You will notice a slight change in your Toolbar, the font should be somewhat differet as well as the “flatness” of the Toolbar. Now you may be asking your self, where is my shadow?! A shadow will not exist under a toolbar for pre-lollipop devices due to the elevation attribute not being supported. The elevation attribute will only work on lollipop devices.

To add a shadow to your toolbar, you will need to add it manually by using a 9 patch drawable. The Google I/0 app does exactly this to achieve a shadow under the toolbar link. Download the shadow 9-patch drawable here and add it to your FrameLayout in your activity as the windowForegorund attribute.

    android:foreground="@drawable/bottom_shadow" />
Toolbar Theme

We also need to set the theme of our toolbar so our text is the right color. This is most noticable when the primary color is dark and the toolbar text colors need to be changed to white. To do this, we need to create a separate theme for our Toolbar:

<style name="BaseToolbarStyle" parent="ThemeOverlay.AppCompat.ActionBar">
    <item name="android:textColorPrimary">#FFFFFF</item>
    <item name="android:textColorSecondary">#FFFFFF</item>

Styled Toolbar My helpful screenshot

Toolbar Overflow Menu Theme

Our Toolbar Overflow Menu is currently white text on a black background. If we needed to change this, we need to specify a new popup theme for the toolbar. Create a BaseToolbarPopupStyle in your styles.xml. By setting the background, and textColorPrimary attributes we can control the toolbar’s overlflow menu’s background color and text color.

<style name="BaseToolbarPopupStyle" parent="Theme.AppCompat">
    <item name="android:background">#FFFFFF</item>
    <item name="android:textColorPrimary">#000000</item>

Also, remember to specify the toolbar theme and the toolbar popup in your toolbar tag:

Accent Colors

It is also possible set the accent colors of widgets. (tinting the widgets). To do this set the colorAccent attribute in your Toolbar’s theme.

<item name=”colorAccent”>@color/accent</item>

On earlier versions of Android AppCompat will only tint a subset of UI Widgets:

  • Everything provided by AppCompat’s toolbar (action modes, etc)
  • EditText
  • Spinner
  • CheckBox
  • RadioButton
  • Switch (use the new
  • CheckedTextView

There are also other ways of using the Toolbar, such as on the bottom or part of the screen. See this link to find out more information.

AppCompat also provides material design theme widgets. I was unable to find a complete list of widgets that applied the material design theme, however it seemsl ike any widgets that support tinting also implement the material design themes.

  • EditText
  • Spinner
  • CheckBox
  • RadioButton
  • Switch (use the new
  • CheckedTextView


Duplicate Resources Error

If you run into this issue (detailed below) them make sure the AppTheme does not exist anywhere else in your other resource files.

Error: Duplicate resources: