Wegner Design Blog

A blog for passionate programmers.

For as long as I can remember I’ve been the “geekiest” person I knew in my age group.  I typed circles around people in grade school, hacked into the macs (we had these) in middle school, and won every programming competition in high school.  I always felt like I was a step ahead of my peers – at least in technology – but resigned to the fact that that my skill was useless until I was “grown up.”  I was a stupid teenager, I had to spend everyday in school, and I had no money.  So, I wasted those years when I had no obligations, and lost the opportunity to pursue what I’m good at with no distractions.

A couple months ago I came across an organization that isn’t OK with teenagers saying “I’m just a teenager”.  Teens in Tech is a company founded by Daniel Brusilovsky to help teenagers get started as entrepreneurs.  Teens in Tech has hosted a conference the past couple years, and this year hosted an incubator consisting of six teenage-run startups.  I’ve gotten to know both the Teens in Tech team, as well as a couple of the incubator teams, and am very excited about the things that are happening.  I try to imagine the things that I could have done if there was a group like Teens in Tech encouraging me to grab my passions by the reigns, and not waste my teenage years.

continue reading…

I’m sure that most of you know by now that I’ve been working on porting fileDrop from PHP to Node.js.  I did this for a couple reasons, but one of my more selfish reasons was for a good excuse to dive into Node.js and really learn it.  With that in mind, I promised myself that I would (or at least try) to write every bit of fileDrop myself.  I didn’t want to use any modules that other people had written for me, that way I would get to know the ins and outs of many different facets of Node.js.  This encompassed quite a few things, including a web server, a MySQL interface,  an HTML parser, and tons more stuff that I haven’t even gotten to.  A lovely side-effect of doing it this way is that I’ve written quite a few useful modules that I’m already starting to use in other projects.  I’m releasing the first of these modules today as it’s own standalone project: node-session

Node-session fills one of the most crucial gaps when transferring from PHP to Node.js.  In PHP you have the invaluable ability to store variables that are unique to a specific user’s session.  This a critical tool – without it you would have to log in to every page you access, every time you access it.  Web sites would never be able to remember any information about you, essentially limiting them down to no-purpose pretty interfaces.  Node-session adds these features to Node.js in an extreamly easy-to-use way, and also with a very lightweight package.  Seriously – the entire git repository is 3KB zipped.

Using node-session is extremely simple – it’s mimicked after how PHP does it, which requires very little interaction.  You can easily run node-session in your program like this:

var session = require('./node-session.js');
 
//Start your http server however you like. Imagine the code below is inside of your server loop
 
var yourSession = session.start(response, request); //response and request are the res/req variables passed from http.createServer()
 
yourSession.testValue = "A session variable" //Create a session variable called testValue
var session = require('./node-session.js');

//Start your http server however you like. Imagine the code below is inside of your server loop

var yourSession = session.start(response, request); //response and request are the res/req variables passed from http.createServer()

yourSession.testValue = "A session variable" //Create a session variable called testValue

That’s it!  One line of code to include the file, one line of code to initiate the user’s session, and you’re ready to go!  Simply add session variable with yourSession.YourVariableHere!

Now, before you get too involved with node-session, I want to make one thing clear.  Node-session is not supposed to replace the features of any other Node.js web server.  There are tons of great Node.js modules out there, and many of them are web servers that kick the pants off anything I could write.  Node-session is intended for very simple use-cases, where a full web server module may be more than is necessary.  I would love to see node-session used in large production systems, but I encourage you to first dig into my source code to make sure you are comfortable with the feature set of node-session.

 

You can download node-session from it’s github repository.

For a long time I’ve been pretty proud to tell people that I do all of my programming from a terminal prompt – utilizing a vanilla vim install.  I’ve been proud to tell people this because of the shock and awe that I get to enjoy after saying that.  It’s been the standard for a long time that web developer’s use an IDE such as Netbeans, Kompozer, Dreamweaver (Yuk!), or others that are more feature-packed than vim.  I had stuck with a vim because none of those IDEs actually work.  The truth is, IDEs for web development are generally good for one thing – either they’re great at PHP, or they’re great with previewing your content, or they’re great with source control, or whatever.  One thing that is always true, though, is that javascript is an afterthought in all of these IDEs.  Every interface I’ve tried has focused on the actual content development of the page, and only added javascript to stop people from getting pissed off.

This annoys me to such a great extent – it seems pretty clear to me that javascript is on the verge of becoming one of the most commonly used languages out there – yet no one has thought to build a good IDE!  Enter my friends at Ajax.org.  The group at Ajax.Org does a lot of javascript programming themselves, and instead of sitting and complaining like me, they’ve done something revolutionary about it.  Ajax.Org recently released the beta version of their IDE, Cloud9IDE – an editor primarily built for javascripters, but with a huge amount of openness that makes it great for any kind of developer. continue reading…

Welcome to part two of the Why Node.JS? series.  If you recall from my last post, I’m currently in the middle of porting fileDrop from PHP to Node.JS.  This is a three part series, consisting of my three main reasons for porting: Speed, Security, and Portability.  This week I will be talking about the amazing security options that come with Node.JS.  Here’s the crazy part, though – even though security is one of my biggest reasons for porting to Node.JS, it isn’t actually a feature of Node.JS. Read exactly how this works after the break.

continue reading…

I’m currently considering porting fileDrop to a node.js web application.  I started reading about Node.JS about a month ago, and played it off as a pretty silly language, mostly useful for apps that required real-time updates.  I wasn’t in the business of building anything of that sort, so I uninstalled it just about as fast I installed it originally.  For some reason, though, it popped back into my head last night and struck me as the perfect thing to build into fileDrop.  What seemed originally as a one-use server technology has now flourished in my head as a limitless framework for web apps and beyond.

I’ll be writing a three part series on why exactly I’m considering this transition.  I’m pretty new to Node.JS so this series will be just as much a learning experience for me as it is for you.  With that in mind, I’d really like to hear some feedback in the comments.  Based on the amount of hype that node.js is generating in the web design world, I would imagine there are benefits that are beyond me, but I will be focusing on the three core principles that stand out to me- Speed, Security, and Portability.  The first of these is speed. continue reading…

I’ve already told you all about one new feature in fileDrop, but the exciting part is waiting for you in the beta.  Here’s a hint : The business-end is up and running!  All of you beta users up to this point have only viewed fileDrop from the client-side, meaning you could only view files uploaded within your group.  Now there is a business end – which is locked to the administrators group – and can view a list of all files uploaded by any group.  This is where the usefulness of fileDrop comes in – allowing a business to easily navigate to the files that their customers have uploaded.  I’ve left all previous accounts in fileDrop intact, but there are a few new things that you will need to know as you get back into beta testing. continue reading…

When i first started the job I’m currently at there was a man here who was similarly excited about building web apps as me.  In fact, he was my motivation to start learning PHP/JS, and we ended up working on a lot of projects together.  I quickly picked up web design techniques, and was blowing him away with how quickly I could design smooth-functioning interfaces.  He asked me what my trick was, and I told him about a framework that has changed my life – JQuery.  His response to my infatuation with JQuery was to say that I was “cheating”.  He was convinced that by using JQuery’s simple functions I was bypassing the heart of javascript, and thus not learning real programming.

He was never able to persuade me, as you can see by all the jQuery in fileDrop, but he did have a very valid point.  It’s often very easy to jump over to the JQuery plugin gallery, pick out something that looks nice, and design your interface with just a few lines of code.  I don’t condone that behavior in every situation – there certainly are huge merits to knowing how to get your hands dirty in actual javascript code.  I found myself facing this very predicament regarding tooltip-like info boxes on fileDrop.  I chose to follow the path of building it myself, in the name of self-edification.  The script is built utilizing a lot of JQuery, but at the same time I’ve written every line myself, and fully understand the ins and outs of it.  Now, in the name of writing your own code, here is a tutorial on building your own JQuery tooltip plugin.

continue reading…

The majority of the times that I’ve taken on the task of learning a new programming language I’ve gotten myself knee-deep in twisted and confusing documentation and reference pages.  Lost in the incredible mass of confusing objects and methods, I usually default to guess-and-check work.  For days and days I’ll work on the most basic projects until finally I’ve etched the syntax so deep into my brain that I can’t possibly forget.  It’s a grueling process, but unfortunately it’s been the only one available without paying for formal training.

When I first started to learn about the LAMP stack I discovered an invaluable resource to help ease the pain of those nonsense reference pages.   continue reading…

I’ve mentioned in previous posts that I was working on incorporating a bug tracking system into my WordPress blog.  It seems that, while many of the options are good trackers, they all lack one or two features that I am pretty eager to have.  Instead of caving and installing a local version of Trac, I’ve decided to set fileDrop up on SourceForge. Long term this will be a very beneficial transitionbecause of the large variety of features and extensions SourceForge provides.

As of right now I’ve only got the Trac module and the Git modules installed, but down the road I might implement the wiki, forums, and even a sourceforge-hosted version of the beta.  What I go forward with really depends on what you – the developer community – want, so let me know!  What have you seen on SourceForge that you would like to see on fileDrop’s page?

You can access fileDrop on SourceForge here.  All bug reports, feature requests, and support requests should be put in on the SourceForge page.  I will continue to update the Issues, as well as the repository, on GitHub until they are no longer needed.

I uploaded a new build this morning and had to work out some kinks with the new file structure.  In the process I had to delete all current users and files.  Sorry for the inconvenience, but it should be simple enough to reregister.  Your group code should be beta, if it is not automatically set.

On the topic of user registration, there have been some privacy concerns I would like to cover.

  • None of the personal data provided in registration is currently being used by the system, aside from displaying metadata in the file list.  The data is collected with the assumptions that real-case business users will want to know some contact information of the people uploading files.
  • None of the personal data provided in registration will be used by myself or the system, aside from contacting you about fileDrop related issues.  Mainly, this will be used for notifications when files are successfully uploaded/downloaded.
  • fileDrop is in the early stages of development, and that has brought up the question of how secure user’s passwords are.  I can assure you, I’ve put a good deal of thought and time into making sure your passwords can’t be accessed by anyone – even myself.  I’ve put up pretty strict walls around the user database – which is actually why I had to wipe out all the old users – as well as salting and hashing each password.
  • Currently in the system there is no option for editing or deleting files or user info.  This is an upcoming feature, but until then I will make it my first priority to remove any files, personal information, or passwords upon request.  You can always contact me at joe@wegnerdesign.com if you need to have something removed.

Hope this clears some things up.  If you have more concerns feel free to post them in the comments or contact me personally at joe@wegnerdesign.com