Search
The Way of the Software Engineer

Web Based IDEs For Java

Posted by admin on September 18th, 2012

Building an environment to develop software takes time. Lots of time. If you gave me a fresh Macbook and said “Go!” it would take me nearly a week to get all my environments set up correctly. Sure, there are smart people using Chef to get around this and automate everything. This is a good idea and makes sure that all the developers in the organization are running the same versions and configurations of necessary development tools (XCode, CMake, Rails, etc.) but even this requires constant maintenance. I would also worry that this enforced uniformity would prevent developers from experimenting with new tools to do things better. Since it’s already quite common to use web based Git browsers (Github.com), web based continuous integration systems (jenkins), web based project tracking systems (JIRA), it doesn’t seem like a stretch to use a web based development environment. It requires no setup and you would only have one environment to maintain.
Read the rest of this entry »

Nodejitsu vs. Heroku for node.js Hosting

Posted by admin on May 17th, 2012

I’ve been playing with Heroku for rails hosting so I started looking for similar ways to host my node.js projects. I had seen a preview of Joyent’s cloud hosting service at Node Camp a while back and found that Nodejitsu is really the modern incarnation of that service. So it seemed time to compare Heroku and Nodejitsu.

A couple weeks ago I was looking at file uploads with Node, so I had a small test app lying around that seemed perfect for a comparison test. Here’s the code on GitHub. The instructions I used for Heroku are here, and the steps I followed for Nodejitsu are here.

Generally, the process for deploying your app on either platform looks like this:
1. User pushes code to cloud
2. Cloud service reads package.json file
3. Dependancies are managed (`npm install` step)
4. Environment is set up
5. App is started

Read the rest of this entry »

M300

Posted by admin on July 14th, 2011

So, the new company I’m working for just released this product called the M300. I don’t work on this team, but they’re a very smart group of people. It does some neat network scanning stuff to detect machines, and there’s an agent that lets you keep track of and install software on different assets. The UI is slick, and the unit itself is quite fetching. It doesn’t require a fan so it can sit dead silent under your desk. Some of the smaller companies I’ve worked for could totally have used one of these. These videos say it all.

Application Configuration for Node.js

Posted by admin on April 27th, 2011

I’ve seen a few blog posts on reading in config files to node.js apps. This can be done with an eval() (which is potentially dangerous) or by reading in a file and JSON.parse()-ing it. I wanted a solution that would work on both a node app, and could also be called as JSONP in the client portion of my app, so I added a non-destructive module block to the bottom of the config file. If module.exports isn’t available, we assume we’re not running in node and call a ‘callback’ function that can be handled by like JSONP.
Read the rest of this entry »

Screen

Posted by admin on March 22nd, 2011

If you’re not aware, screen is a fantastic way to extend the usefulness of your terminal windows. I run a screen session on my laptop and one on every machine I SSH in to frequently. I just scp this file to any host I’m going to be working with for an extended time. “How to use screen” is a common enough blog post, so I’ll just skip to my .screenrc :

startup_message off
term screen
defscrollback 10000
escape ^Oo
vbell off
bind h prev
bind C hardcopy
hardstatus off
bell_msg ""
shell -$SHELL

Read the rest of this entry »

Static Sites with Dynamic Content

Posted by admin on March 15th, 2011

In my last post, I was showing how a proxy can be used to circumvent XSS rules and said there are some interesting applications. Well, it’s time I posted one. Take a look at this very simple site (Please ignore the messy CSS, this is just a prototype) : Twitter Search

This is being served statically from Nginx without writing any server-side logic. Read the rest of this entry »

Nginx Bypassing Single-Origin Policy

Posted by admin on March 11th, 2011

Anyone building a web application knows that XmlHttpRequest can only be made to the same domain and port that the page was loaded from. This is known as the ‘single origin’ policy for web browsers. Bypassing this restriction is known as Cross-Site Scripting or XSS. While there are some very real security reasons for only allowing a web page to access resources from its own domain and port, there are some really cool things that can be done when bypassing this restriction.
Read the rest of this entry »

Simulating Bezier Curves with CSS

Posted by admin on November 18th, 2010

I recently had to make a visual editor that included lines between different boxes to define the ‘flow’ of a process (think UML). Rendering something like this in a web page is sometime tricky when you want the line to look fluid between it’s two connecting points. What I wanted was something like Bezier curves. I built a series of prototypes to figure out which one would meet the needs of this project best. I’ll walk though my options and conclusions in the next few paragraphs, but this was the result:


Drag the boxes around to see the effect.

Read the rest of this entry »

Mayor / Celebrity Programming Puzzle

Posted by admin on November 10th, 2010

Also known as the “mayor problem” or “mayor puzzle”, this is a directed graph puzzle where a group of people have single directed relationships. That is person A knows person B, but person B may or may not know person A. The puzzle is to find a person in this group that everyone knows, but he only knows himself. To phrase it differently, this breaks down to two conditions:
1) person C must be known by everyone, and
2) person C must know no one but himself.

The obvious solution is to compare every member to every other member and that would give you a solution that runs in O(n^2). If we’re given a function called ‘Knows’ that accepts two arguments (and returns in O(1)), we can write a PHP function like this:
Read the rest of this entry »

Applying JOONE to Real-World Data

Posted by admin on June 6th, 2009

JOONE is a toolset used to build and run neural networks in Java.  To demonstrate its capability, I’ve built a simple supervised network and trained it on a common data set used for other machine learning projects.  By using a common data set, comparisons can be made between the different approaches.

The data set was published by the Audubon Society Field Guide and describes the characteristics of mushrooms found in North America.  Read the rest of this entry »