initially started as a Geocities website when I was in 6th grade. Over the years, it has slowly evolved into a place where I can practice and become familiar with web development as it progresses. I started out coding with Microsoft Frontpage, then moved to Dreamweaver. Initially, there was very little coding, and it was all WYSIWYG. However, as I learned more, I could make it more interactive.

I incorporate drawings and blog posts to keep those that are interested updated. Through the evolution of the website, I was forced to learn HTML, PHP, CSS, XML, jQuery, javascript, and the handling of MySQL Databases. I've put online some code samples.
Gifntext - Update 5

My main time outside of work/play has been working on the gif editor gifntext. There've been a bunch of updates since the last post, and I wanted to share them:

The main gifntext page in August, 2015
Gifntext - August 2015
The main gifntext page in January, 2016
Gifntext - January 2016

One reason I enjoy working on this is because I'm learning so much. Here are a few things I've learned in the ~6 months the website has been active:

Not only do I enjoy making the tool, but I get almost instant feedback, as I see people using it and making requests. To date, there have been 29,854 gifs created. Here's what the editor looks like now:


As the website has continued to grow, there have been some enhancement suggestions that I'm toying with implementing:


Another Gifntext Update
Following up on last post I thought I'd give another update on gifntext, as that's what I've been doing in my free time. There've been a bunch of updates in the last month:
The last one was the biggest one. It existed for a long time, and I couldn't figure out what was going on. You can see it in this soccer gif, right as the ball hits the post. Look for it glitching.

Background: The gifs that gifntext generates are very big files. In order to generate them, I take a frame, and do some magic on it to encode it so that it works in a gif. This encoding is process intensive. Because of this, I encode a gif frame by frame, rather than encoding the entire gif at once.

Once encoded, the frames are then saved to a file. I'd boiled down the issue to the fact that sometimes the frames saved out of order (for instance, it would save frame 5, then frame 7, then frame 6). However, the way that I was generating frames, this seemed impossible. This is because the next frame could only generate once the previous frame finished. On top of all of this, this bug never occurred when I was generating a gif. I could only see that on the "recently created" page, some gifs were skipping. This made it extremely difficult to debug. It also made debugging take a while, as I had to wait until I saw that a gif skipped before I could go examine the log to see what happened. I ended up creating a script that logged every single action that any user made in the order that they did it so that I could trace the code path that was taken. The log looked something like this:

        step: about to doStep while generating 10, Are we stepping?true
        Dostep: We are within doStep on frame 10(though it will change to 11) here
        DoStep: about to step frame 10
        DoStep: we just stepped to frame 11
        DoStep:  We are about to save frame 11
        SaveFrameToFile: about to save  frame  11 to file
        DoStep:  We just saved frame 11
        step: just did Step while generating 11 Are we stepping?true
        saveFrameToFile: Adding frame was a success - Previous: 10, Current: 11
        SaveFrameToFile: Now that we have succeeded in adding that frame, going to step
It allowed me to see which function I was in, and which frame was just added.

Using this log, I was able to find out that sometimes frame 1 ended it's process (without even saving the file) prior to frame 0 ending it's process. What this meant was that we actually had two concurrent processes trying to add the frames to the same file. I was able to add in a variable that allowed only one process of generation at a time, and the bug was fixed. This bug was the gifntext version of my water rendering problem from dangeraffe; both issues were challenging, but I logically went through the code and after much persistance, was able to solve the issue.

There are many new enhancements that I'm still hoping to implement, given that I have time:

Those are mostly just ideas that I've had for the website. Maybe I'll add a simple poll, so that people can fill in what they want to be on the site.

Gifntext - An Update
The majority of my time away from work has been working on gifntext, which is a website that allows you to add images or text over a gif. I was tired of seeing a bunch of cool gifs online without having any way to make them. Some of my favorite gifs (which I now know to be called animal text gifs, involve dubbing text over animals:
cat ballet gif

cat ballet gif

cat ballet gif

I had started to keep a perosnal repository of gifs that would be fun to dub over. However, I realized there was no easy way to add the captions to a gif. Because of my work with dangeraffe, I was pretty familiar with html canvases. Also, there was a point in dangeraffe where I had experimented with a recording feature so that you could record your craziest moments. Because of this, I had a solid base working with canvases. I decided I'd try to make an online gif editor, and see what would happen.

It started out with me just googling different gif libraries, trying to see what already existed. One requirement was that I wanted it (at least initally), to be all client side, so I wanted to try to do it with javascript whenever possible (this ended up happening, although some of the gif saving is saved to a file for memory purposes). I found a bunch of useful resources regarding how to turn gifs to a canvas. After a bunch of trial and error, I had a basic website set up where you could add text to a gif, and gifntext was born.

I posted about it on reddit, hoping to get some feedback, and got many positive responses, as well as ways that I could improve the website. I took all of the feedback, and developed the site for about three months. This was such a long process because I could only work on it in the off hours. On top of that I had to balance it with playing with my dog:
With the addition of the new requests, I realized the website was gaining popularity when I kept getting emails saying that generation of longer gifs wasn't working. I used excel and some javascript output to create the chart you see to the right. To understand this chart, you just need to know two things. First, gifs are just long strings of characters. Second for the gif generation, I go frame by frame, convert the image to the proper string of text, and then add that text to a long string, which we eventually spit back out as the gif file. What I found was that the later frames took much longer than the earlier frames. Because each frame is relatively the same size (width/height), it is not due to generlly having more data on these frames. Rather, it is because the string that represents the gif is being held in memory, and it is getting bigger and bigger. When I say big, I mean 7,000,000 characters big. When I initially developed it, I was only testing on smaller gifs, and just wanted a proof of concept. Once it was done, I figured I'd fine tune the performance aspects. The result of this is that, each time we added a new frame, we were going over every character in this long string. Because this is all happening client side, the client eventually runs out of memory. Once i realized this, I did some reorganization of code, and was able to completely eliminate the overhead of keeping that string in memory, as the frames are now saved off to a file on the server each time a frame is added.

This was the biggest problem that the website was facing. Once this was solved, most scalability concerns were handled, and I was able to sit back and see if the site was useful. From what I can tell, gifntext really is the easiest way to add text or images over a gif that I could find online. I'm now trying to learn more about search engine optimization, so that the website appears more frequently for appropriate searches. Using a simple SQL query, I grouped the number of uploads by day, and graphed that over time.

You can see that the number of uploads really started to take off around September 3rd. This is all with minimal advertisement. If I added a watermark to each gif, I could greatly increase the visibility of the site, as every gif would essentially be a link back to my site. However, I've chosen thus far to not implement a watermark, as I think it somewhat ruins the gifs to have dozens of watermarks all over from different websites. Hopefully the users are nice enough that they'll link back to the site, and word of mouth will be enough.
Sevi and Vinny

Here's a picture of my dog meeting our neighbors dog:

I've always been frustrated that there's no easy way to create gifs with text over them, so I've been working on a side project to do just that. It allows you to add text to a gif.

Simulating and rendering water from liquidfun.js, a box2d port
After some significant development in dangeraffe there was still one thing that really bugged me that I wasn't able to solve. Water just didn't feel right.

Rather than being a continuous liquid, it was just a series of differently sized balls. While the balls did have physics that mimicked liquid flow/properties, I couldn't stand how it looked. I had no idea even where to begin, but after a bit of googling, I was able to find a helpful page that explained the term I was looking for: Rendering.

In essence, I had the locations of all of the balls given to me by the liquidfun engine. What I wanted to do was find a way to render(display) those balls, without displaying the actual balls that were there. Instead I wanted to display something that moved and flowed like water, and looked like one coherent unit when all together.
I ended up on a blog post about Liquid Simulation in WebGL by Chris Wellons, which looked like it was right up my alley. However, it mentioned using something called WebGL, which I had never heard of at the time. From what I coudl tell, it was a way to take some stress off of the CPU when rendering, and instead use the GPU. Again, this was a foreign language to me, so I ignored it. Chris had made a bottle like simulation , and broadly detailed the steps needed to render water:
  1. Do a physics simulation of balls in a container
  2. Render the simulation onto a raster
  3. Blur the image
  4. Apply a threshold
Steps 3 and 4 were the crucial part. They were the actual solution to the question "how do you turn the balls in liquidfun/box2d into a liquid-like substance?"

While I won't get into too much detail about the actual mechanics behind rendering, (you can find more here), you must first blur the balls, and then you apply a threshold. Blurring the balls makes them appear more as one continous body. Applying the threshold allows a clear cut outline of any given water bodies. If the image is above the threshold, we paint it black (or in the case of water, blue). If it is not above the threshold, we paint it white.
While testing, you can alter the threshold to see what it would be best as. Too small, and nothign shows up because everythign is too blurred. Too big, and the threshold does not have any affect, and you get a blurred image.

Blurring and Thresholding
Now that I knew I had to use a blur and a threshold, (and because I had never worked with WebGL), my first thought was to look for a javascript library that would do this for me. My thought was, because my image is on a canvas, I can simulate all of the water balls on a seprate canvas, apply the blurring and thresholding, and then draw the image on that canvas. I looked at a bunch of different libraries, the most helpful were The problem with the libraries above is that they are all javascript based. glfx.js is actually a webgl framework, but I didn't even know enough to know that this is what I should be using, and that it was different. While I was able to get a tiny implementation running via stackblur, it required copying the red,green, and blue values for every pixel on the canvas. I had to do this every frame (the game runs at around 60 fps), and then redraw this on a new canvas. This was much too process intensive, and I was getting at maximum 5 or 6 frames per second. It was at this point that I decided to take a break, and admit defeat....or so I thought.

I developed some new features, but still couldn't get the water rendering out of my head. About three weeks later I decided to revisit the issue, and try from a fresh start. My new implementatation started as an actual copy of the bottle simulation mentioned before. I didn't know WebGL, and wasn't about to learn it. Water was important, but my time could better be used implementing other features. Therefore, I copied the entire bottle simulation repository, and pasted it into my directory. I then worked backwards, figuring out the coordinates relative to my coordinates, deleting the spikes on the sides, and so on. Eventually, I had a bottle simulation that was running over dangeraffe. The canvases were overlaid, with the bottle simulation being above dangeraffe.

I was able to transfer my points via an array to the bottle simulation, but the simulation kept crashing. This was a result of it having a memory leak from using an outdated version of box2d. I spent a while porting the included box2d into liquidfun.js (aka B.Vec2>b2Vec2, B.World>b2World...). I was relying on this fixing the memory leak, and it did.

The last step was to map the water points that I currently had in dangeraffe into points that were appropriate for the bottle simulation. This was the part that took the longest, as it turns out the y axes are inverted and the bottle simulation goes from -1 to 1 on both axes. Once I had a function that could map my points to the bottle canvas, it was just a matter of calling the render function from my source dangeraffe code, and we ended up with beautiful flowing water. It's not the prettiest implementation, but I'm not exactly going for coding points. Dangeraffe is for me, as much of a coding learning tool as it is a game, so the fact that the code is not pristine for the rendering is just fine by me :).
Adding A Custom Notification/Ringtone Sound to your Galaxy S6

Making the custom file available

1. Open the My Files application(The default file manager on Samsung devices). By default this is in the tools folder.
2. Under Local Storage, open the Device Storage option
3. Browse to the audio file, long press on it, tap MORE in the upper right, and select the Copy option
4. On the new screen that appears, under Local Storage, open the Device Storage option

5. Under Device Storage, find the "Notifications" folder (or Ringtones folder if you are adding a ringtone), open it, and tap PASTE HERE

Selecting it
6. Open up your phone's Settings
7. Under Device select Sounds and Notifications

8. Select Ringtones and Sounds

9. Tap either Ringtone or Default Notification Sound, depending on what you are changing

10. On the opened list, select your audio file to activate it.

Box2d/LiquidFun b2EdgeShape
In implementing the paintbrush in dangeraffe I found an interesting aspect of b2Edgeshapes: they cannot collide with each other.

My setup for the brush is to continually draw a line from the last point where the mouse was to the current point. Whenever the current point changes, draw a line between the last and current point, and then update the last point to be the current point.

Each of these lines is a b2EdgeShape, and I'd then attach them to a body and things would work. However, I didn't anticipate that b2EdgeShapes can't collide with each other. It also seems like they have some weird properties that are not ideal for creating proper collisions. Though not ideal, rather than drawing a line in box2d it would make more sense to draw a very short/long rectangle. The only tricky part about this is rotating the rectangle correctly.

Below is the commented code for drawing a rectangle from a previous point (this.lastbrushPos) to the current point (currPos):
Drawing.prototype.addBrushStroke = function(point) {
    var color = "#000000"; //make the brushstroke black

    //currPos and this.lastbrushpoint are points relative to the center point of the body
    var currPos = new b2Vec2(point.x - this.start.x, point.y - this.start.y); //Make it relative to where you start

    //the length of the line is the distance between the points
    var width = Point.distance(currPos, this.lastBrushPos);

    if (width < .5) return; //For optimization, only draw lines when it is greater than .5 

    //Drawing a body requires knowing where it's center will be. This midpoint is the center.
    var midPoint = getMidpoint(currPos, this.lastBrushPos);

    //We will rotate around the midpoint to a certain angle.
    var angle = getAngleBetweenPoints(currPos, this.lastBrushPos);

    //Initialize the brushStrokeProperties
    var brushStrokeProps = {
        color: color,
        desc: "brushStroke",
        extDesc: "Custom Object",
        width: width,
        height: .25,
        density: 8,
        angle: angle,
        classID: 1,
        canTrash: 1,
        offSet: midPoint
    //Create the fixture definition
    var brushStrokeFixDef = createFixtureDef(brushStrokeProps);

    //Add the fixture to the body
    addFixtureToBody(brushStrokeFixDef, this.drawing);

    //Update the old position to be the new position.
    this.lastBrushPos = currPos;
The initialization of brushStrokeProps, createFixtureDef, and addFixtureToBody is code specific to me. They allow creation of bodies and fixtures to be a lot easier in the long run. They can be found in BodyGen.js.

getAngleBetweenPoints does exactly what it states-it gets the angle between two points. Keep in mind, this works for my coordinate system which has Y increasing as we get lower on the screen.
function getAngleBetweenPoints(p1,p2){
    var newPoint=new Point(p1.x-p2.x,p1.y-p2.y);
    var pointAngle = Math.atan2(newPoint.y, newPoint.x);//get the point angle
    return pointAngle;
Where to Buy Chance The Rapper's Acid Rap On Vinyl (and other info)
Below you'll find the information I found when I was looking to get Chance the Rapper's Acid Rap on vinyl. I'm writing this to spare others the same research I did, and to get the information all into one place.

To set things straight, there is not an official release of "Acid Rap" on vinyl. The only official release of "Acid Rap" has been via download online. There was a bootleg CD that came about, and actually managed to make it into the billboard top 100 but the CD has since been discontinued.

The reason you can't find an official release (and probably won't in the future) is because the album features some samples that were never cleared. Despite this, vinyl-digital decided to press the album in 2014, limiting the pressing to 1000 hand-numbered copies (original sale page, obviously out of stock). Vinyl Digital pressed in three different colors:
Despite pressing the same amount of yellow and pink records, the pink is more sought after as it matches the art of the sleeve. The album cover features art from chance the rapper's official mixtape, and has the tracklisting for the two double-sided LPs on the back:
Though I'm not an audiophile, the quality of the sound on the record I received was very good. I cannot hear a quality difference between this bootleg and other officially pressed records that I have. From various sources online, the quality of vinyl-digital bootlegs is excellent.

Where to get it
Vinyl digital has not stated they intend to make more pressings, so you could try them first, but the odds are they will still be sold out. There have also been a few floating around on eBay, but the most reliable place to get it is via If you don't care about the color, the clear albums were going for around $30 a few months after it was released, but have been steadily climbing in price (currently, the cheapest is around $50+shipping). The starting price for pink is around $228+shipping.

More Images

Thanks to user Billobatch on reddit for some images
Conclusion to the Ballpit

If you didn't know, a while back I created a ballpit with my two roommates. It was exactly as we'd hoped it to be, and we had a bunch of fun playing in it and making various puns. After two years of ownership, I was moving into an apartment, and no longer had the space for it. As sad as it was, I knew I had to let it go.

I decided to post an ad on craigslist to see if anybody was interested. I was going to leave it at that, but driving to work the next day I had an idea. What if I could get the fact that a ballpit was being sold on air? Now I'd gone my whole life without ever paying for radio advertisements, and I'll be damned if I was about to break that streak. So I called in during a commercial break, and had a little chat with the hosts. I figured if I called in, maybe they'd mention it for a bit on their show. Fortunately for the ballpit, and unfortunately for me and my radio-awkwardness, they were recording the call. Once the commercials were over, they eventually played our conversation in full. Lucky me.

As it turns out, I received over 20 responses. Some just wanted more information, some just wanted to say the post was funny. I was able to sell it for $375, which gives the world the concrete fact that ballpits depreciate at a rate of $25 every two years. After it was sold, I still got emails inquiring. Many were wondering, now that it was gone, how do build their own. To make things easier so I didn't have to copy and paste the same thing to each inquiry, I made a page which helps you plan out making your ballpit. Making that page was also a good refresher in php and javascript, so it was a win for me as well.

Fast forward 9 months or so, and I see a thread on reddit for another ballpit being sold in Madison. The ad is similar enough that you can tell they based their ballpit off of mine (structure is the same, sippy cups, same dimensions, ball numbers, etc). However, I could tell it was not my baby because the ball colors were way off.

Overall, it was a great journey, and I would advise anyone who is thinking of building a ballpit to just get some balls and do it.

Want more? Check the blog archives
Untitled Document