Media Server: Open for Development

February 18th, 2009

I have picked a version number based on its current progress.  It is ready for download and development by the community!  I have labeled it 0.4.0 (Alpha) because there is still a ton of work to be done.  Fortunately, there is enough code already made and it is so fully featured it is just a matter of plugging out some code for more features.  It is even cross platform!  That’s right, it should now be able to run on WAMP (Windows, Apache, MySQL, PHP), LAMP (Linux, etc.), and MAMP (Mac, you get the point).

Current status and Feature overview:

It can run without a database, and just show a flat file structure (I don’t recommend running this unless it is behind a secure connection).  Or is can run with a database and allow for quick searching!  Aliasing can be used on paths by matching the paths with regular expressions, so even if your operating system doesn’t support links, the users can still see pretty paths!

As discussed before, the site contains 3 main parts, “modules” which are responsible for handling different file types.  It currently handles zip archives very nicely, thanks to the getid3() library for PHP.  It also handles ISO images, and can catalog the entire file-system contained in an ISO.  It supports any audio and video type that VLC can handle using an external process.  It can convert any image that ImageMagick can handle (which is a ton!).  Which leads me to the “plugins” section; plug-ins allows users to access the files.  Plug-ins provides a link between the files loaded by the modules and the output of the files in the templates.  The “encode” and “convert” plug-ins read files from the database and send them to other external programs, or set header information and allow for downloading.  The “select” and “list” plug-ins are the most important; select allows users to view the files and select files to be downloaded in the future.  The list plug-in allows users to download the list of selected files in many different formats.  List formats can be defined in various ways, either a plug-in could be written to handle a specific type of list, or the template system can be used for outputting a type of list.

Finally, it uses Smarty for its template system, so its appearance has limitless potential.  There is default template that provides easy viewing on phones, and an EXT JS template that takes advantage of the EXT JS library to provide a beautiful Windows-like frontend to the users.

Plans:

Here I will discuss some of the plans for features I would like to add to the site.  A “movies” module that can recognize DVD images and full length movies on the file system, I would like it to download information from IMDB.  A “subversion” module that can recognize subversion databases on the file system, and alternatively checked out projects from a remote repository, it will then list all the files apart of the remote or local subversion, it will also be able to recognize diff files and versions.  An archive plug-in will be added to handle outputting any file into multiple different archive formats.  It will also handle outputting single files that come from archives.

More templates!  I plan on copying templates from more popular (but less feature-rich) services such as Ampache, Jinzora, kPlaylist, and even WinAmp Remote!  Adding templates is easy using the Smarty template system.

Download:

Here is the download information for the site, and some links to its recommended software.

Using SVN:

This is the recommended option because I am making changes all the time!  Look in the comments for the revisions to find out which revision to update to, the latest may be a work in progress!

svn checkout svn://bjcullinan.com:62690/Media%20Server/

Download archive:

Both of these are cross platform, zip or rar just for convenience.

mediaserver.rar

mediaserver.zip

Links:

LAMP, WAMP, MAMP

VLC

ImageMagick

Enhanced cTorrent

Hack of the Week: 2-Channel Streaming in the Car

December 19th, 2008

Some of us can’t afford an iPhone and AT&T’s overpriced and unreliable service plan.  I have an alternative.  Most networks offer some kind of internet plan, Verizon for example is only an extra $30 per month, no matter what plan type you have.  Alltel also offers an all in one package.  Here I will discuss an alternative to using Pandora on an iPhone.

The Phone:

I am using a Treo 700WX for this example.  One of its many features is 2-channel audio output.  Stereo jacks are separated into different segments.  On most stereo jacks there is a tip, a middle segment, and a ground.  On the standard stereo jack the left channel is the tip, and then right channel is the middle segment.  On cell phone jacks, it is usually a mini-stereo jack where the tip is left channel, and the middle segment is microphone.

The Treo however supports 2 channel audio; so the jack has 4 segments.  The tip is then the right channel, the first segment after that is the left channel, then the microphone, and then ground.  So if a 3 segment jack that is not made for the Treo is used, the microphone still uses the right segment.

With the Treo’s unlimited data plan I can stream music from my server using TCPMP.  But I still need a way to connect the phone to the car stereo.  This task would have been greatly simplified if I had a stereo with an auxiliary input.

The Stereo:

The stereo is stock equipment.  It has a CD player and a tape deck.  Fortunately I had a stereo jack to tape converter lying around.  The first modification I made was I removed the mysterious locking device inside the tape converter.  There are a series of gears that if turned at a different speed will lock in to place.  This was preventing the stereo from using the tape converter properly, and after I removed it, it worked perfectly.

I then unsoldered the 3 mounting points for the standard stereo jack, and soldered on the wire from the ear-buds for my phone.  The hard part was actually getting the wire from the phone jack attached to the solder; the wire is very small and is encased is a metallic-looking casing that makes it difficult to tell if it the wire in the middle is actually making contact.  I recommend attaching it at an angle from straight above the devices to increase the likelihood of it making contact.  Also, using a multi-meter is always a good idea.

The Stream:

Video over LAN Media Player (VLC) is very useful when setting up a stream-able connection.  It can trans-code any type of audio and output any bit-rate in any format.  So, I used an mmsh-asfh stream, which is generally compatible with windows media player.  I can load a playlist file and add the –loop option to make the playlist keep repeating.  There are many other options, for example making the playlist play in random order.  I can then connect to that on my phone using TCPMP.

Finally I have 2-channel stereo audio streaming wherever I go in my car.

Getting a Job: A Perspective of the Interviewer

November 25th, 2008

This week I collected an article from a valued friend, and respectable employer.  Assistant Vice President of EBSCO Industries, Roger Rohweder, explains his experience with hiring employees and how one can appeal to the employer and acquire the job they are looking for.

Yesterday I interviewed a candidate for a tech support position here at work.  The young man had recently graduated from Appalachian State, so I thought of both of you as he crashed and burned trying to get hired.  While that painful experience was still fresh in my mind I thought I’d try to help you avoid his mistakes, and give you a better chance at securing the job(s) for which you will soon be applying.

I knew that the applicant had very little experience, but was open to the possibility that he was bright, eager, and had somehow gained some of the skills I needed.  Maybe he created his own web site, or facebook application.  Maybe he did projects as part of his coursework that directly apply to the work I would have him doing.  Maybe he organized and successfully held a successful event.  Anyone I hire will need to learn quite a bit — why not give a rookie a chance?

Selecting the Right Opportunity:

My candidate was in trouble early.  He was very soft spoken, in the geeky way you have seen before.  Yet the position required communicating with customers, including training sessions for groups of customers.  This was not a position that was going to work for this guy.

Where do you feel confident?  Are your computer skills stronger than those around you?  Are you the one (among your friends, classmates, etc.) who organizes and leads?  Are you a problem-solver, for you and others?  Are you a counselor?  Do people seek your advice?  Did you excel in a class or activity?  Think about how areas in which you feel confident would make you successful in the job I am offering.  It will help you decide if the position you are considering is a reasonable fit.  And you can use those strengths / accomplishments to sell yourself to me.

The Resume and Cover Letter:

My applicant provided no cover letter, and the resume was probably exactly the same one he used for every other position he applied for.

I have reviewed several hundred resumes a year for a number of years now.  It is easy for you to do better than the hundreds that I immediately dismiss.  Make your resume and cover letter fit the opportunity.

  • Don’t make me wade through lines and lines of information that doesn’t apply.  Talk to me about exactly what you bring to the position that I have advertised.  If there are other reasons my position is attractive to you let me know: “I am also a voracious reader of historical fiction, so the fact that your company provides readers advisory products means I would probably be working with people with shared interests.”
  • Show me that you took the time to understand MY needs, and THIS company.  Mention my company name and the specific position in your cover letter.  Tell me specifically what you will bring to address my particular needs in your resume. In other words, even if you have a “base” resume and cover letter, customize them for each company that you are applying to.  It takes more time but is worth the effort.

The Interview:

The applicant I interviewed came to the interview apparently expecting that I would figure-out whether he had what I needed, instead of coming prepared to convince me that he had what I needed.

Every interviewee is nervous.  That is natural.  Keep in mind, however, that I want you to be the right person.  I am not trying to eliminate people, I am trying to find people.  I would love to be done interviewing, confident that I have found the right person for the job.  I need to know that you have the capacity to do the job — that you can either demonstrate that you already have the skills or can convince me that you can gain them (typically some of each).  I need to decide whether you will “play well with others”.  That you communicate well, have reasonable social skills, and that you convince me you will eagerly work with the team to help it achieve its goals.  And I need you to convince me that you want THIS job.

  • Research the company.  Try to find a mission statement.  Look for recent press releases.  This will arm you to let me know you want THIS job, with THIS company. It will also help you prepare questions you should have for me.
  • Research the position.  Understand what responsibilities someone in that role would have.  This will prepare you for the type of questions you are likely to get.  And will help you prepare questions you should be asking of me.
  • Look me in the eye and speak clearly.  Don’t make me ask you to repeat answers, or make me drag answers out of you.
  • Think about the question before you answer — it will likely be your only chance to impress me on that point.  There should be very few times when a one-word answer is appropriate.
  • If you don’t know an answer, or don’t have a skill you are being asked about, do not try to fake your way through it.  I am likely to be VERY experienced in that area, and you will only appear dishonest.  If you have a related skill that might apply, suggest it: “I have not done any javascript development, but I have some perl experience, and so I believe I could develop the skill.  I would be willing to study on my own time to make that happen quickly.”
  • Listen! I am giving you clues.  You will be able to hear when I am probing on something important to me, and the you are not giving a sufficient answer.  If I ask the same question (possibly worded a little differently) twice, think about why I had to ask twice.
  • It may sound counter-intuitive, but I may learn good things about you when you tell me about things you have done wrong.  I will see that you understand why something didn’t go well, and have learned from the mistake.  A part of my definition of “experienced” is “learned from mistakes attempting this work in the past”.
  • Consider taking notes.  You will want to hang on to questions that come up until the appropriate time to ask them.  You may want to note areas where the interviewer is making his needs clear beyond what you understood coming in, so you can address them completely.
  • Ask questions.  You need to know what you are getting yourself into.  It makes me nervous when a candidate has no questions.  I am trying to hire someone who will be solving the problems of the position — show me you are applying your brain to THIS problem.

The Follow-Up:

If you are told you are not going to be considered for the position, take the time to learn why not.  It is hard to do this right after a disappointing “no”, but you need to look at each interview as an opportunity to do better in the next one.  If you are given the impression after the interview that I am going to consider you for the position, write a follow-up email.  Thank the interviewer(s) for their time.  Pick the strongest argument you now think you have for being selected and briefly make (or repeat) your case.  Remind them that you want THIS job.  Do not take shortcuts in this important part of the process.  Approach each opportunity as you would a competition rather than as an unpleasant task.

Resouces:

Your university’s Career Development Center can provide much of the support you will need to get your career started.  Take the time to take full advantage of that resource.  And there are oceans of materials for job seekers on the web and in libraries.  It is not for lack of available help that applicants send me inadequate cover letters and resumes.  It is because they didn’t spend the effort needed to succeed.  Here are a couple of brief articles I came across that you might find useful, however:

Cover Letters

Taking Notes

Hack of the Week

November 5th, 2008

Overview:

Set up a proxy server with SSH in order to bypass network throttling, and content filtering.

Here is what I did:

Follow this page to installing squid on Linux and get a basic understanding of how a proxy server works:

http://www.ubuntugeek.com/how-to-setup-transparent-squid-proxy-server-in-ubuntu.html

Then connect using putty but first add some ports.  Follow this page in order to get a basic understanding of putty and tunneling:

http://kimmo.suominen.com/docs/proxy-through-ssh/

The important thing to note is they probably have port 3128 and 8080 throttled, since that is used for proxy.  So I just changed my Source Port to 1337, and my destination is localhost:3128. This means that on my local computer 1337 will end up on the remote computer as localhost 1337.

Finally I changed my settings in Firefox to use the proxy by going to Tools->Options->Advanced->Connection Settings…  The HTTP proxy is localhost port 1337.  This will allow us to bypass any network throttling.  Of course there will be a performance loss because of the encryption, but it is probably still faster.  It will also allow us to get around stuff like WebSense and censorship.

Enjoy!

Operating System Independence

October 30th, 2008

Operating system independence means not relying on a specific operating system to be productive and accomplish tasks quickly and efficiently.  Everyone has a preferred operating system, and for a lot of us we stick to that operating system.  However, when we are forced to use a different system like in the work place versus in our home, we feel like we lose a lot of control and compatibility.  I am here to tell you; that is untrue.  We can remain productive power users completely independent of our environment.  Here I would like to discuss some software alternatives for different operating systems to meet some common needs.

Here are a few scenarios to keep in mind:

Dual Booting is the process of installing multiple operating systems on a single computer set up.  This can be accomplished by using a file system that is compatible with both operating systems, or using completely separate partitions, an advanced boot-loader is needed to allow the user to choose at startup which operating system to boot into.  In this scenario, the operating system runs on the native hardware, and only 1 operating system can be run at a time.

Virtualization is making a computer emulate multiple computers.  This works by having a main computer run virtualization software on the native hardware, we will call this our host.  The host can now emulate the architecture of another computer by processing CPU and hardware device logic in software form instead of actual hardware.  We will call these computers our clients.  A virtualization solution can emulate multiple computers at the same time, meaning we can boot and run multiple operating systems in parallel.

VMWare on OS X

Now let’s talk about some of the differences between operating systems.

Graphical User Interfaces:

The most obvious difference between operating systems is the graphical user interface or GUI for short.  This is how an operating system looks, for example the start menu and desktop on Windows, or the Dock and Finder on a Mac.  One of the hardest things for people to learn is how to use a different environment when it looks and acts completely different.  But underneath it all, the environments are not very different at all.  This is evident by the fact that they all have to run on the same type of CPU and hardware.

There is software available that has the capability to drastically change the way Windows looks.  We can make Windows look and act just like a Mac.  Stardock and TweakUI are examples of this.  They can apply user made themes to Windows.  Some of these themes are vastly different from how Windows looks by default.  Stardock has some more in depth features that includes a Dock that looks and acts like the one available in OS X.  On Linux, a lot of theme functionality can be accessed using Emerald and Compiz/Fusion formerly Barrel.

Compiz/Fusion

A lot of functionality comes from the Dash Board available in OS X.  Other operating systems like Windows and Linux can tap into this functionality as well through Google Desktop.  Google Desktop enables functionality such as Quick Searches and system information right at your fingertips.

Google Desktop

If you are a Mac or Linux user, you are probably familiar with the command line.  This functionality can now be achieved on Windows.  Microsoft Power Shell is software similar to the command prompt that exist on Windows by default, but is gives the user a lot more control, and it acts similar to Linux command line shells.  If you are looking for a more in depth solutions, CygWin is for you.  CygWin is a Windows port of a lot of UNIX functionality; maintained now by Red Hat and NetApp.

Cross Platform and Cloud Computing:

Software compatibility is, in many cases, a determining factor of what operating system to use.  For example, not all systems are compatible with the advanced features of Microsoft Exchange.  For accessing the Exchange online, browsers other than Internet Explorer have limited functionality; this could pose problems for Linux and Mac users.  Contrary to that, some software is fully featured and available for both Windows and OS X.  For example, Adobe Creative Suite has always been available for both operating systems.

This still leaves a market, though rather small, in the dark.  Linux desktop users are many times left out of the software circle and forced to fend for themselves.  Luckily, there are Open Source community maintained software suites that can be compiled for any system.  Open Office is a good example of this.  Open Office supports many of the features that Microsoft Office does, but without the dependence on Windows.

Open Office Impress

Sometimes we wish to erase the line between software and the system it depends on.  This can be done with cloud computing.  Cloud computing is a term used to describe a solution that exists over the internet.  These solutions hide the complexity of the infrastructure that supports them.  Google Apps is a great example of cloud computing.  It is in itself an operating system, which can be accessed and run by a web-browser.   Development for the Google Apps platform is also made easier by cloud computing by abstracting the complex infrastructure into easy-to-use APIs.

Remember our second scenario, Virtualization?  There is a solution to becoming operating system independent that uses a similar idea called Web Desktop.  Web Desktop is a method of accessing fully functional desktop environments, provided by any operating system, over the internet or local network.  This relates to Virtualization by a single system used to serve out any number of desktops and environments to its clients.  Many times, Web desktops are actually handled by virtual servers that can allow many connections to the same operating system but in a completely isolated user space.

Development and Getting Things Done:

Development solutions are an essential part to a Computer Scientist’s productivity.  These solutions even have their own name/acronym, Integrated Development Environment or IDE.  Now when it comes to cloud computing Integrated doesn’t sound like a friendly term; cloud computing tries to accomplish all the functionality without the need to be integrated with anything.  Therefore, we as developers are still stuck using an operating system of a specific flavor.  Fortunately, there are IDEs for every environment.  Eclipse and NetBeans are cross platform IDEs built on the Java technology.  Which IDE works best for you, is mostly personal preference since they all support plug-ins and extensions for expanding their functionality.

If you are more of a text-based developer, TextMate is an excellent solution.  Unfortunately, it is only available for Mac.  However, E Text Editor is provided by a completely different company and is available for Windows.  It even supports the exact same bundle files as TextMate.

Now for the hard part: What about Linux?  Adobe Creative Suite isn’t supported on Linux, neither is Visual Studio or TextMate.  This means I can’t develop in anything .Net, and I can’t use Adobe’s unique suite of web-development tools like Dreamweaver.  The only thing left to use is VIM.

Fortunately, for Linux users, there is an entire community of people with this exact same problem.  In addition, they can all pool together to make lots of open source software that can be accessed for free with a handy package manager.  Nevertheless, it is Linux, and there is always a hard, longer path to take.  Wine is an implementation of the Windows API for X, OpenGL, and UNIX.  Wine can help us accomplish the overly difficult and tedious task of installing and running some Windows software on *nix.  There is a lot of information available on getting Creative Suite to run on Linux, you just have to search for it.

Wine Running Photoshop

Our solution to developing .Net software on Linux is Mono.  Mono is a cross platform, open source .Net development framework.  It includes things like running ASP.Net on apache using the mod_mono module.  They even offer and IDE for developing in .Net called MonoDevelop.

Getting Things Done or GTD, is a popular method used to manage one’s time and resources to accomplish everyday tasks more efficiently.  Managing tasks can be complicated but there is a lot of software available to help.  On Windows, I have always been a fan of using the Microsoft Office Suite for task management.  OneNote is handy software for taking notes in meetings or class.  However, it can also be used for making lists of things I have to do, and organizing many list items by date or location that I have to accomplish them.  OneNote can synchronize with other devices like a laptop or even my phone.  It also connects to Outlook for creating appointments and sending e-mails.

OmniFocus is popular GTD software for Mac.  In addition Linux just takes a simple Google search to find open source software that will work just as well.  You could even go a step further and implement your own cloud computing solution and use gtd-php, a web based PHP solution for Getting Things Done!

Finally, one of the most important topics to becoming independent of operating systems is being able to play video games!  Games are becoming more and more compatible with Windows AND Mac OS X.  However, Linux users are once again left to fend for themselves.  MAME is a cross platform arcade emulator.  It can also emulate things like DOS for running older games.  For newer games however, Cedega is a company dedicated to making games compatible with Linux.  Cedega by TransGaming works closely with the Wine project, modifying some of Wine’s shortcomings in order to be compatible with newer games.  They provide a full list of supported games and can guarantee they will work on your Linux system.

MAME

Conclusion:

I hope I have convinced you that there are plenty of solutions for every use and operating system.  We don’t have to be victim to operating system wars and, with a little effort, can always find alternative solutions to meet our needs.

Here are some links to get you started on being independent of your OS:

VMWare

Make your Windows desktop look like OS X

Stardock

Compiz/Fusion

Google Desktop

Cygwin

Open Office

Sun Global Desktop

Eclipse

NetBeans

TextMate

E Text Editor

Wine

Running CS3 in Wine

Mono

OmniFocus

gtd-php

Using OneNote for GTD - via LifeHacker.com

Cedega

MAME

Making a Batman Costume: Preface

October 25th, 2008

I decided to blog about this subject because all of my friends are tired of me talking about it.  Fortunately they also don’t read my blog.

Background:

I decided I wanted to do this project ever since The Dark Knight came out in theaters.  I have become an even bigger fan of Batman since Christopher Nolan started directing for the franchise.  Tim Burton did a great job for the time, but compared to the new movies (Batman Begins, and The Dark Knight) he never took it seriously enough.  I attended DefCon last August, where there was a female dressed in a ninja costume.  They generally have a Black and White party, and my eagerness to create a Batman costume grew.

The Plan:

I have thought a lot about what materials to use for such a costume.  I have considered aluminum plating for the armor pieces, I have researched metallic mesh for the under-armor, and I have made many trips to arts and crafts stores and hardware stores looking for materials.  I came across a close up shot of the costume on the front of a magazine, I decided to read the text on the side, what just happened to be an interview, they asked what materials were used.  I discovered the armor plates are rubber, lots of rubber.  I decided this was the best solution; I would first form all the pieces out of clay, then invert the mold using plaster, and finally pour different strengths of rubber for different sections.  I had finally found a solution that was feasible.

I plan on spreading this project out over a year.  I will be working on the castings for each piece as shown in the scene with Fox presenting the new suit to Bruce.  I would like for some parts to be removable so that the under-armor it attaches to can be washed.

Here is one of the best pictures I have seen of the costume:

dark_knight.jpg

Certain parts like the bands that hold on the gauntlets and arms pads will be a stretchy type of rubber which I plan to attach little metal hooks to, and the actual armor parts like the shoulders will be a much harder rubber.  I anticipate the hardest parts to create will be the pants, the utility belt, and the chest plates.

the-dark-knight-got-milk.jpg

thedarkknight1.jpg

batbelt.jpg

Computer Coffee Table

October 23rd, 2008

For the last few weeks I have been working on a project of a different kind.  I decided to build a coffee table to house my media server.  As you can see from the photos, it has come along nicely.  It is complete with sound activated cathodes, and a monitor sitting under the glass top.  The project cost me around $300 when I had initially planned on only spending about $100.  I still think it was worth it.

dsc03122.JPG

The table is 4 feet by 2 feet, about 18 inches tall, and has 3/8 inch tempered glass.  The computer components are pretty standard.  I use a long DVI cable and convert it to HDMI to go in to my receiver.  The audio output is digital over coaxial, coming from an Audigy 3.  A wireless Logitech mouse and keyboard is useful for typing and browsing from the couch.  It also has sound activated cold cathodes that look really cool when playing music with lots of sub.

dsc03121.JPG

I think it turned out pretty well…

Setting Up a DNS Server

October 23rd, 2008

Background:

Before last night I had never used a DNS server.  I lacked any understanding of how the registry and ROOT servers worked, and I definitely didn’t know how to configure the domains on my end.  The reason I wanted to set up a DNS server is so that I didn’t have to rely on another company for domain forwarding or sub-domain set up.

Terminology:

Let’s get some terminology out of the way first, just so that when I toss around words below, it can be better understood by everyone.
The Registry: An international database of all the textual domain names registered on the internet.
TLD: Top-level-domain: is the last part of an internet address, for example .com or .net.
Root-Server:
A DNS server that redirects requests to the appropriate TLD server.
Domain Name: A text representation of an address on the internet.  For example bjcullinan.com is a domain name.
DNS: Domain Name System is a hierarchical naming system for computers, services, or any resource participating in the Internet.
DNS-Server: or Name Server is a server that provides access to the DNS system, it accepts requests for a domain, then returns an answer being an IP address or another domain.  So the requests waterfall down through the DNS servers until it finally reaches an IP address it is looking for.
Sub-Domain: is a more specific address that is underneath (in hierarchical terms) the domain name. For example wiki.bjcullinan.com has a sub-domain “wiki” for the domain “bjcullinan” with the TLD “.com”.
Lookup and Resolve: Lookup is the action of asking a DNS server where to go when trying to access a website.  Resolve is a term used to describe a domain being found and pointing to an IP address or another DNS server that contains the IP address.

DNS Explained:

From the beginning, and this part will probably be dumbed down because I hardly understand the interworking of it myself.  There are 14 ROOT servers around the world; these servers contain the TLD (.com, .edu, .net) information for other servers.  These other servers hold the domain names.  So when a look up is performed it first selects the correct TLD, and then selects the domain that you are looking for.  Finally it returns a list of name servers that point to a specific IP address.  A name server basically contains information about the domain, sub-domain, and IP address to pair it with.

Here is where it gets a little more complicated.  I started playing around with a domain I claimed for my mother, pqbride.net.  I changed the name server for that domain to ns1.bjcullinan.com.  This allows all traffic trying to reach pqbride.com, and sub-domain <anything>.pqbride.net, to be directed towards my DNS server at ns1.bjcullinan.com.  So, how would I get ns1.bjcullinan.com to point to my server?  Well, bjcullinan.com points to my server, but ns1 is a sub-domain, this was problematic for me because I cannot register sub-domains in my domain providers DNS server, so now I was stuck.

Here’s the catch.  I have control over bjcullinan.com, so I changed the name server for bjcullinan.com to ns1.bjcullinan.com.  Now I have a loop, in order to resolve bjcullinan.com I have to resolve ns1.bjcullinan.com, but in order to resolve ns1.bjcullinan.com I have to resolve bjcullinan.com.  The solution for this is a feature provided by the registry.  There is an option to register a name server completely independent of the domain.  You pair this name server with the IP address.  Finally, I registered ns1.bjcullinan.com as a name server and sent that to my IP address.

The Task:

Now that I have completed the domain name set up, I can start configuring my own domains.  Every address that I want people to access must be specified and handled by my DNS server.  Otherwise the lookup will be broken and the address will be inaccessible.

I started off by installing bind9, this consisted of a simple apt-get command on Ubuntu.  I did this step months ago and finally got around to configuring it last night.  I configured my zones, which is a fairly simple task.  Here is an example of a zone definition in my named.conf.local file:

zone "pqbride.net" {
   type master;
   file "/etc/bind/zones/pqbride.net.db";
};

Obviously I need the same type of definition for my bjcullinan.com domain.  This points to a DB file where all the subdomains are listed.  Here is my bjcullinan.com db file:

$TTL 3D
@ IN SOA ns1.bjcullinan.com. admin.bjcullinan.com. (
   2008062001
   28800
   3600
   604800
   38400
)
       IN    A          209.250.30.30
       IN    NS         ns1.bjcullinan.com.
ns1    IN    A          209.250.30.30
www    IN    A          209.250.30.30

So now we can dissect the configuration a little.  The $TTL is Time To Live and specifies how long a DNS server should wait before checking for updates.  The IN stands for Internet.  The NS stands for Name Server.  The 2008062001 is a version number for the configuration file that I have formatted to look like a date, but it can be anything.  This number must be incremented every time the configuration changes.  The reason for this is because other computers will download this configuration and cache it, this allows for faster lookups when requests are made.  If the index number is the same, they will just assume they have the latest version and ignore the changes.  At the bottom there is a list of 4 items that handle the domain and sub-domains.  It tells the IP address, in this case, that each domain points to.  As you can see the sub-domain “ns1” points to my IP address.  So now when pqbride.net is looked up it will resolve to ns1.bjcullinan.com which then resolves to my IP address.

Conclusion:

Task accomplished!  I am now able to add sub-domains to my domain names without relying on another company.  When I register a domain name all I have to do is point it to my name server that is all set up.  Awesome!

Computer Science

October 14th, 2008

Yet another semester of school progresses and projects pile up higher and higher.  I was inspired to write this article and have been meaning to do so since last spring.  I have always wanted to be a Computer Scientist; I knew it was the field for me since I was very young.  It has however been a lot harder of a path then I expected.

History:

For as long as I can remember I have used a computer.  Before I learned how to program I played Reader Rabbit and Treasure Mountain.  I remember most vividly the day our Gateway arrived in ’95.  It booted into Windows 95 and I was excited and very fascinated.  Of course the first software we installed was Doom, Wing Commander, and Myst.

I remember a day when I came home from school to find my step dad programming a Tax Calculator.  The exercise was from the VB 4 book that came with Visual Studio.  Later when he was not around I looked at the code he had written, intrigued I clicked the compile button and saw the incredible potential of programming computer applications.  At age 12 we wrote a computer Pokedex program together.  After that project my step dad didn’t do much programming in Visual Studio anymore, however I continued to learn and add features to my Pokedex, and eventually moved on to greater projects.

After that experience I knew that I wanted to be a computer scientist.  A college education has always been expected of me and my brothers.  Steve (my step dad) invested in tuition credits, and my father has always held high expectations of me.  So when I finally got to college I already knew that Computer Science was the right field of study.

Computer science is…

Not just writing code, or drawing pictures, or making a game.

In fact that sums up only about half of what we do; for those are all just applications of the skills and concepts we learn.  The other half of the field is based on the theoretical.  As computer scientists we are constantly encouraged to ask “why” and “how”.  Why do we still use a Von Neumann Architecture?  Will it ever change with the coming of optical computing or quantum computing?

Unlike many other fields, computer science is an abstract science, in that every concept we need to learn cannot always coincide with a real world or practical example.  In some science and engineering fields you are expected to learn “everything” that is currently known in the industry.  After you have a degree and you work in that field you discover new things to add to the industry.  Computer science is different in this respect, because it requires us to learn everything about the industry at any given time.  Why do we use this type of technology?  What brought us to this point?  Where will it go from here?

As you can imagine, the theoretical aspect, as well as the rapid progression of technology, makes computer science a difficult field to keep up with.  As computer scientists, we must constantly be learning new technology, and new methods of solving problems.  I frequently encounter cases where lower classmen for example do not know how to program.  Programming is the easy part, understanding how to develop software is the hard part.

Present:

Now I have always been a Do-It-Yourself-er, so when it comes to some functionality that I need on my computer, I can just write something up real quick to make it happen.  Most of the general public that goes about their simple computer interacting lives don’t appreciate that ability.  Or they think that it is computer wizardry.  But knowledge is relative.  My list of computer science wizards would include John von Neumann, Edsger Dijkstra, Linus Torvalds.  To most people those names mean nothing, but to me they are gods.

We learn many different aspects of computers, how processors work, how abstraction works, even how to calculate how long an algorithm will take to execute.  My most recent project is writing my own programming language in Compilers class.  We use high level languages like Java and Visual Basic.  40 years ago people were using punch cards to make a computer do what they wanted.   30 years ago people wrote software using processor commands in binary.  10 years ago people cared about how much memory a computer has, and how big programs are.  Today, memory management is frivolous.

Computers have come a long way even within the last 10 years and if a computer scientist doesn’t keep up to date with that technology, they will be filtered out by the industry.

Technically speaking…

Some of the fun technical things I have learned, trees and stacks grow downwards, as you can tell by the illustration.

cartoon.jpg

I really just wanted an excuse to make a cartoon.

Detailing the Media Server Website

September 21st, 2008

My progress on the media server website has been slow, but nevertheless it is coming along. The framework and backend part of the site is reaching the public testing stages and the source will soon be available for hacking.

As I mentioned in previous posts, the site revolves around 2 main sections of functionality. The ‘modules’ section which contains the input processors for reading in files, and the ‘plugins’ section which contains very specific functionality for using the files. The information is stored in a generalized database with each table containing the data for each individual module. The front end can consist of various templates.

Aesthetically pleasing design:

I have stopped working on the inferior but still useful list output, and have implemented an API called Ext JS that offers a wider range of functionality. Although it uses some intense JavaScript, the library is very stable and has turned out nicely. The best part is; I didn’t have to design any of it graphically. All I have done is implement the conceptual ideas and some extra functionality.

I am trying to accomplish a design that combines features from our favorite operating systems and media players. The windows like look and feel of a file browser, the iTunes look and feel of a media player, and a VLC conversion engine on the backend is the ultimate goal. As you can see from the site below, it is coming along nicely.

http://209.250.30.30/mediaserver/

Please save the security testing until the code is available, I am constantly making improvements on the backend security, but I can only work so fast.