Start of the Independent Studty

This semester I’m working on an independent study involving migrating the old Computer Science server (cs.worcester.edu) to a more updated platform (with a focus on installing new Wiki software and moving over articles from the old software), looking into and setting up a Git server for the CS department, and work on setting up a milti-node Eucalyptus cluster. For some of this I’ll be collaborating with Dillon Murphy, in the case of the Eucalyptus cluster I’ll be sharing hardware with his Hadoop cluster for that, in the case of the server migration, I’ll be focusing on migrating the Wiki and he’s focused on the blog, and we’ll be working together for the git server.

For the first step of the project, we installed a CentOS 6.4 virtual server on the VMWare platform. We had a bit of trouble getting the VMWare console to load, the web extension that allows it to work didn’t seem to want to work on anything, and we ended up installing the wrong VMWare clients and not having them work, so eventually Dr. Wurst had to open up his Windows virtual machine and run the VMWare client he had installed on that. Once we got that running, everything ran smooth and we were able to get everything up and running without any issues. We used a minimal install of CentOS, allowing us to focus on only installing the applications we need.

We set up some user accounts for ourselves on the new server and the old server, and on the new server I installed some essential applications as well as the EPEL (Extra Packages for Enterprise Linux) repository. If you don’t know, most distros of GNU+Linux use a package manager to manage the installation of applications, and they use repositories as the sources they get the applications from; CentOS relies on the YUM package manager, and while the repositories it comes with by default are good for most cases, there are a few odd applications you’ll want to get from the EPEL.

Here’s what we installed and why:

  • vim – text editor
  • emacs – another text editor (can’t have too many of these)
  • tmux – terminal multiplexer, similar to GNU Screen. This allows you to run multiple terminal windows in the same session, with a few extra features.
  • mosh – Mobile Shell- http://mosh.mit.edu/ ; a replacement for ssh that has some cool ideas such as client ip roaming and lag compensation.
  • httpd – Apache web server
  • MySQL – MySQL database
  • htop – displays running processes, cpu and memory statistics, I think it’s much more easy to use than the standard top application

This should be good enough for now; if any of our projects need any more dependencies, we can install those, but this is a pretty reasonable set-up for a web server.

My next focus will be the installation of MediaWiki, probably to a /wiki directory on the server. I’ve set up one before at my job with nice Wikipedia styled links and it’s a bit of work but shouldn’t be too difficult; my main worry is getting a reasonable set of plug-ins to use with it to provide us all the functionality we could need (as well as documenting the process). I also want to look into using Worcester State’s LDAP server for the MediaWiki users, as MediaWiki has an LDAP plugin. If that doesn’t work or we can’t get the LDAP details, it seems like the Google Apps Authentication plug-in will serve the exact same purpose.

The next step after MediaWiki would be to set up a GitLab server. GitLab is a free software knock-off of GitHub. While it would be nice to have a GitHub server up and running, I’m pretty sure they charge a ton of money for their enterprise self-hosted solution and GitLab provides enough functionality for what we want where it’s not really an option. I have a bit of experience with GitLab, and from what I’ve found installing it from scratch doesn’t really work out too well, but BitNami has an easy installer, as well as a VMWare appliance for GitLab. I’ve set up a server using the easy installer before and it’s extremely easy to set up, although it’s installed to a pretty non-typical location so it behaves a bit different from a native installed application. For that reason I think if we set up the VMWare appliance it’d be the best option for us, as as far as I know that’ll be a native installed GitLab on a pre-configured server. But that’s something we’ll just have to find out. We want something that’s easy to maintain (or doesn’t have to be maintained much at all) and easy to upgrade if we need to upgrade it.

As far as the Eucalyptus platform goes, I haven’t looked too much into that yet. For the hardware I’m sharing 10 or 11 servers with Dillon Murphy as he works on his Hadoop cluster. We’re not sure if we’ll just split the servers between us, attempt to install both platforms on each server, or set up a Virtual Machine host and install a VM for each platform on each server. I think that ideally installing them side-by-side on each server would be the best option but if they have conflicting dependencies there would be problems with that, so it’s something we’ll have to figure out when we get to that.

From the blog Five mvs of Doom by Chad Wade Day, Jr. and used with permission of the author. All other rights reserved by the author.

Blogging for Updates

Attending my final semester at Worcester State University in computer science has given me a great opportunity to be in an independent study where I can work on something that will benefit the program. Throughout the semester I will move over the current CS blog from an outdated operating system to the latest CentOS, help set up a git server using gitlab, and research and implement a hadoop cluster.

The anticipation this semester is that the work being done will be used in the computer science department and will help courses offered in the future. Writing solid documentation throughout the semester will allow maintaining, and possibly duplicating the results as easy as possible. In order to keep the computer science department in the loop, I will be blogging weekly with the current status of the project, problems encountered, cool bits of information I’ve come about, and research finds.

This semester allows me to stay active in the computer science department while finishing up my final liberal arts requirements. It should be both a fun and productive semester, and in the end there should be some solid results.

From the blog WSU Comp. Sci. Servers » wsucs by dillonmurphy10 and used with permission of the author. All other rights reserved by the author.

Font Rendering in OpenGL with Pango and Cairo

I am working towards a 0.1 release of my game development framework
for GNU Guile, guile-2d. One of the few remaining blockers on my
to-do list is font rendering. A reddit user, Madsy9, pointed me in
the right direction with this comment. There are two libraries needed
to perform nice font rendering with proper internationalization
support: Pango, "a library for laying out and rendering of text, with
an emphasis on internationalization," and Cairo, "a 2D graphics
library with support for multiple output devices."

It took me awhile to put together all of the pieces and build a
working sample program. The goal of this post is to help others that
may be trying to accomplish a similar task that have no prior
knowledge of Pango and Cairo. I will assume basic knowledge of C, SDL, and
OpenGL throughout this post.

Let’s get the basic SDL and OpenGL initialization out of the way:

#include <pango/pangocairo.h>
#include <SDL.h>
#include <SDL_opengl.h>

#define WINDOW_WIDTH 800
#define WINDOW_HEIGHT 600
#define FONT "Sans Bold 18"
#define TEXT "The quick brown fox is so かわいい!"

void
init_sdl ()
{
    SDL_Init (SDL_INIT_EVERYTHING);
    SDL_SetVideoMode (WINDOW_WIDTH, WINDOW_HEIGHT, 0, SDL_OPENGL);
}

void
init_gl ()
{
    glClearColor (0.0f, 0.0f, 0.0f, 0.0f);
    glDisable (GL_DEPTH_TEST);
    glEnable (GL_BLEND);
    glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    glEnable (GL_TEXTURE_2D);
    glViewport (0, 0, WINDOW_WIDTH, WINDOW_HEIGHT);
    glMatrixMode (GL_PROJECTION);
    glLoadIdentity ();
    glOrtho (0, WINDOW_WIDTH, WINDOW_HEIGHT, 0, -1, 1);
    glMatrixMode (GL_MODELVIEW);
    glLoadIdentity ();
}

create_texture simply creates an OpenGL texture given an array of
pixel data and the texture dimensions. Our Cairo surface will use BGRA
color.

unsigned int
create_texture (unsigned int width,
                unsigned int height,
                unsigned char *pixels)
{
    unsigned int texture_id;

    glGenTextures (1, &texture_id);
    glBindTexture (GL_TEXTURE_2D, texture_id);
    glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    glTexImage2D (GL_TEXTURE_2D,
                  0,
                  GL_RGBA,
                  width,
                  height,
                  0,
                  GL_BGRA,
                  GL_UNSIGNED_BYTE,
                  pixels);

    return texture_id;
}

draw_texture clears the screen, renders a simple textured quad
using OpenGL’s immediate mode, and then swaps buffers.

void
draw_texture (int width,
              int height,
              unsigned int texture_id)
{
    /* Render a texture in immediate mode. */
    glMatrixMode (GL_MODELVIEW);
    glLoadIdentity ();
    glClear (GL_COLOR_BUFFER_BIT);
    glPushMatrix ();
    glBindTexture (GL_TEXTURE_2D, texture_id);
    glColor3f (1.f, 1.0f, 1.0f);

    glBegin (GL_QUADS);
    glTexCoord2f (0.0f, 0.0f);
    glVertex2f (0.0f, 0.0f);
    glTexCoord2f (1.0f, 0.0f);
    glVertex2f (width, 0.0f);
    glTexCoord2f (1.0f, 1.0f);
    glVertex2f (width , height);
    glTexCoord2f (0.0f, 1.0f);
    glVertex2f (0.0f, height);
    glEnd ();

    glPopMatrix ();
    SDL_GL_SwapBuffers();
}

create_cairo_context is used to make a new Cairo context that
draws to a raw data surface. The return value, a cairo_t, is the
main object in Cairo. All drawing is done via a cairo_t object. A
context needs a surface to draw on.
cairo_image_surface_create_for_data creates a raw data surface for
us. We will be translating the surface into a texture later on.

cairo_t*
create_cairo_context (int width,
                      int height,
                      int channels,
                      cairo_surface_t** surf,
                      unsigned char** buffer)
{
    *buffer = calloc (channels * width * height, sizeof (unsigned char));
    *surf = cairo_image_surface_create_for_data (*buffer,
                                                 CAIRO_FORMAT_ARGB32,
                                                 width,
                                                 height,
                                                 channels * width);
    return cairo_create (*surf);
}

create_layout_context also makes a new Cairo context, but this
context is for PangoLayout objects. In Pango, a layout describes the
style of a paragraph of text. The layout needs a context in order to
function. We use cairo_image_surface_create with dimensions of 0x0
because we won’t actually be rendering to this surface. Instead, we
will layout our text and use create_cairo_context to build a
context with a surface that is the size of the rendered text. Cairo
uses reference counting for dynamically allocated objects, so we need
to call cairo_surface_destroy when we’re done with the temporary
surface. The context still maintains a reference to the surface, so
the memory for the surface will not be freed until the context is.

cairo_t*
create_layout_context ()
{
    cairo_surface_t *temp_surface;
    cairo_t *context;

    temp_surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, 0, 0);
    context = cairo_create (temp_surface);
    cairo_surface_destroy (temp_surface);

    return context;
}

get_text_size tells us the size of the text that’s in the layout,
in pixels. Pango’s units are not in pixels, so we must divide by
PANGO_SCALE in order to get pixel units.

void
get_text_size (PangoLayout *layout,
                unsigned int *width,
                unsigned int *height)
{
    pango_layout_get_size (layout, width, height);
    /* Divide by pango scale to get dimensions in pixels. */
    *width /= PANGO_SCALE;
    *height /= PANGO_SCALE;
}

render_text is where all of the magic happens. First, we create a
layout with a layout context and set the text that we will render with
this layout. TEXT is defined earlier in the program as "The quick
brown fox is so かわいい!"

Then we create a PangoFontDescription object. This object
represents the font that we want to render. Earlier in the program,
FONT is defined as "Sans Bold 18". Pango is able to figure out
how to load a font from a string in this format. Your system must be
able to recognize the font family and font face, though. I haven’t
yet figured out how to have Pango render an arbitrary font from a
*.ttf file.

Next, we create a rendering context by getting the layout’s size and
creating a context with a surface big enough to show all of the
rendered text.

Finally, we set the font color to white, render the text to the
surface with pango_cairo_show_layout, and create an OpenGL texture
from the surface. We also clean up all the objects that we no longer
need before returning.

unsigned int
render_text (const char *text,
             unsigned int *text_width,
             unsigned int *text_height,
             unsigned int *texture_id)
{
    cairo_t *layout_context;
    cairo_t *render_context;
    cairo_surface_t *temp_surface;
    cairo_surface_t *surface;
    unsigned char* surface_data = NULL;
    PangoFontDescription *desc;
    PangoLayout *layout;

    layout_context = create_layout_context ();

    /* Create a PangoLayout, set the font and text */
    layout = pango_cairo_create_layout (layout_context);
    pango_layout_set_text (layout, text, -1);

    /* Load the font */
    desc = pango_font_description_from_string (FONT);
    pango_layout_set_font_description (layout, desc);
    pango_font_description_free (desc);

    /* Get text dimensions and create a context to render to */
    get_text_size (layout, text_width, text_height);
    render_context = create_cairo_context (*text_width,
                                           *text_height,
                                           4,
                                           &surface,
                                           &surface_data);

    /* Render */
    cairo_set_source_rgba (render_context, 1, 1, 1, 1);
    pango_cairo_show_layout (render_context, layout);
    *texture_id = create_texture(*text_width, *text_height, surface_data);

    /* Clean up */
    free (surface_data);
    g_object_unref (layout);
    cairo_destroy (layout_context);
    cairo_destroy (render_context);
    cairo_surface_destroy (surface);
}

main is pretty simple. We initialize SDL and OpenGL, render text
to a texture, and enter the rendering loop. The program will run
until you click the close button, press "enter", or press "q".

int main (int argc, char **argv)
{
    SDL_Event event;
    int keep_running = 1;
    unsigned int texture_id;
    unsigned int text_width = 0;
    unsigned int text_height = 0;

    init_sdl ();
    init_gl ();
    render_text(TEXT,
                &texture_id,
                &text_width,
                &text_height);

    /* Update/render loop */
    while (keep_running) {
        SDL_PollEvent (&event);

        switch (event.type) {
        case SDL_QUIT :
            keep_running = 0;
            break;

        case SDL_KEYDOWN :
            if (event.key.keysym.sym == SDLK_ESCAPE)
                keep_running = 0;
            if (event.key.keysym.sym == SDLK_q)
                keep_running = 0;
            break;
        }

        draw_texture (texture_id, text_width, text_height);
        SDL_Delay (16);
    }

    /* Clean up */
    glDeleteTextures (1, &texture_id);

    SDL_Quit();

    return 0;
}

And we’re done! You should now be able to render some text in an
OpenGL context. I hope this brief tutorial was helpful. Font rendering
isn’t easy, and it’s not really my area of interest. I’m glad that
Pango exists to do all of the real work for me so that I can more
quickly move on to the parts of graphics programming that I actually
enjoy.

You can download the full source code here.

From the blog dthompson by David Thompson and used with permission of the author. All other rights reserved by the author.

The Little Schemer

Yesterday, I took a trip to the MIT Press Bookstore and picked up a
copy of The Little Schemer. I’ve only spent a few hours reading and
coding along with it, but I’ve had a lot of fun. The following is a
mini-review based on my experience thus far.

"The Little Schemer" teaches you to think recursively using an
interesting and comedic writing style and the Scheme programming
language. While Scheme is the language of choice, the real goal is to
teach you problem solving rather than the details of a specific
language. The book starts off simple, explaining what atoms, lists,
and S-expressions are. Rather than providing the definition and then
showing examples, it first gives examples in the form of a question
and answer.

Example:

Is it true that this an atom?

atom

Yes, because atom is a string of characters beginning with a
letter.

From the examples given, a definition is created. In later examples, a
Scheme procedure is written that produces the correct answers for all
of the questions stated before it. It’s fun to build the procedure,
verify that it works for all cases, and compare your implementation
with the book’s.

"The Little Schemer" defines ten commandments that are essential to
correctly solving the problems in the book. Some commandments are
first given in an incomplete form, and expanded later when a greater
level of understanding has been achieved. The problems that you solve
reinforce the commandments. You might notice that you start writing
procedures without thinking much about it, much like the muscle memory
earned from using Emacs a lot. Gerald J. Sussman was right when he
said that this book "can perform the same service that Hanon’s finger
exercises or Czerny’s piano studies perform for the student of the
piano." I have no idea who Hanon and Czerny are, but I get it. For the
drummers out there, you could liken this book to Stick Control.

The writing style is very informal, comedic, and food themed. Page 13
has a space reserved for jelly stains, and page 52 tells you to "go
cons a piece of cake onto your mouth." I have laughed a number of
times while reading. Oh, and let’s not forget about the cute elephant
drawings. This is definitely not your average boring, dry computer
science book. If you are interested in a unique and enjoyable learning
experience, then I highly recommend reading "The Little Schemer".

From the blog dthompson by David Thompson and used with permission of the author. All other rights reserved by the author.

AngularJS Post-mortem

AngularJS is the new popular client-side Javascript application
framework developed by Google. We have recently adopted it at Vista
Higher Learning for building our latest features that require a lot
client-side logic. Now that I have a few applications under my belt,
it’s time to talk about my experience.

If you want a quick TL;DR: I think AngularJS is good, but it has a
steep learning curve and there’s no well defined set of best
practices.

Note: I will be using plenty of terms that will probably only make
sense for people that have used AngularJS.

The Good Stuff

These are the things that went well. The things that made me glad that
we chose to use AngularJS.

Easier Testing

Our Javascript test suite uses Jasmine. AngularJS is built with test
frameworks like Jasmine in mind. AngularJS could tends to be easily
testable due to dependency injection. When the components of an
application don’t rely on global state, it is easier to mock services
for unit tests.

Separation of Concerns

AngularJS stresses separating the view from the data structures and
logic behind it. I think everyone that’s written a somewhat complex
JQuery application can relate to the mess of CSS selectors and click
callbacks that the code quickly degenerates into.

AngularJS allows you to break up the DOM into logical chunks that are
handled by separate controllers. Treating the application as many
small pieces working together rather than one giant DOM blob keeps the
code clean. Message passing via $emit and $broadcast keeps
controllers loosely coupled to each other.

No More JQuery Spaghetti

Directives, the strategy for encapsulating DOM manipulation, are
wonderful. It is an elegant solution to the mess that was JQuery
selectors and event callbacks. AngularJS comes with a lot of
directives out of the box to handle the most common stuff like
showing/hiding elements, handling clicks, dynamically setting CSS
classes.

More Maintainable Code

AngularJS is feature-rich. It does a lot on your behalf, which greatly
reduces the amount of boilerplate code needed to get a prototype up
and running. I had the opportunity to essentially rewrite an existing
JQuery application using AngularJS. The results were clear: The
AngularJS version had fewer lines of code, was more readable, and
was easier to debug.

Bumps in the Road

These are the things that didn’t go smoothly. They boil down to
AngularJS having a steep learning curve and ill-informed software
design decisions on my part.

Understanding the Magic

A lot of things seem to happen by magic. For example, it is possible
to make a asynchronous request and get a promise object in
return. When the promise is assigned to a variable on $scope,
AngularJS not only knows to ignore it while the request hasn’t
finished, but it will re-assign to that variable the value of the
asynchronous call when it completes. It is a nice feature, but it
takes some digging to find out what is really going on.

Poor Documentation

I know I’m not the only one that hates the official AngularJS
documentation. The documentation is getting more complete, but it’s
still not very useful. Functions frequently have a blurb describing
what they do, but no explanation of the parameter list. It’s hard to
use a function that doesn’t describe what it expects for input.

When the documentation confused us, which it did frequently, we turned
to the AngularJS book from O’Reilly for help. I need to get around
to reading more of it.

RESTful Resources and Rails

AngularJS claims to be targeted at CRUD applications, but using the
HTTP backend and the Resource abstraction that sits on top of it was
particularly difficult. A good amount of time was spent on trying to
get the HTTP requests from resources to conform to what our Rails
backend expects, like root-wrapping.

Bloated Controllers

I frequently made controllers that had too much state and logic that
should have been extracted into services/factories/etc. A controller
would start out slim but would quickly grow to several hundred lines
of code as features were added. Controllers should be the middle man
between the view and the model and that’s it.

Some tell-tale signs that a controller is becoming bloated:

  • There are a lot of private functions (not defined on $scope)
  • Functions are defined on $scope just so you can unit-test them,
    but are never used in the template

I attribute controller bloat to a lack of knowing the appropriate uses
for other AngularJS components. It was easy to just keep adding to the
controller.

Conclusion

Overall, I think things went well, but I (and the rest of my team)
made a lot of beginner mistakes. But that’s the learning process,
isn’t it?

Now that I know more about AngularJS, it will be easier to make better
design decisions moving forward.

I believe that as AngularJS continues to mature, some concensus in the
community about best practices will emerge that will make things
easier for beginners.

From the blog dthompson by David Thompson and used with permission of the author. All other rights reserved by the author.

guile-2d – A 2D Game Development Framework for GNU Guile

This is the very first devlog entry for my pet project, guile-2d. As
the title suggests, guile-2d is a 2D game development framework for
GNU Guile, a Scheme implementation that has the honor of being the
official extension language of the GNU project. Guile is a language
with a growing number of features, but it still lacks a large
assortment of libraries. I like to do 2D game programming, and I saw a
niche that needed to be filled. Python has Pygame, Lua has Love, but
there’s no fun and accessible game programming library for
Guile. Guile-2d is working to correct that.

The goal of Guile-2d is to create an easy to use 2D game programming
framework. Libraries like SDL give the programmer a rather low-level
set of tools that they can use to build a game, guile-2d will provide
high-level tools over low-level SDL and OpenGL for commonly used
elements of 2D games: tile maps, sprite animation, particle systems,
collision detection, vector math, A* pathfinding, etc. Such features
will allow a game developer to very quickly produce a working
prototype with guile-2d.

Guile-2d is a framework, which means that it has some opinion about
what the right way to do things is. The most apparent example of this
is the game loop. The game loop runs at 60 frames-per-second and uses
fixed timestep updates. Those that have read Fix Your Timestep will
know that this decision is a good thing.

Perhaps the most important feature of guile-2d is the ability to do
"live coding". When the game loop starts, a REPL
(read-eval-print-loop) server is started. Using the great Geiser
extension for Emacs to connect to the REPL server, one can modify
their game as it is running. This gives users the power to evaluate
some new code and see the changes reflected immediately in the game
window. No need to restart the game unless you crash it!

This has been a brief overview of some of the features and goals of
guile-2d. If this project interests you, you can check out the source
code on Github.

From the blog dthompson by David Thompson and used with permission of the author. All other rights reserved by the author.

StumpWM on Debian Wheezy

Everyone that’s ever talked to me about software development knows
that I am in love with Emacs. Emacs has a wonderful keyboard driven
interface and is almost infinitely customizable via Emacs Lisp. I’ve
done a lot of programming in Emacs from my not-so-great laptop
lately. My laptop has a rather poor 1280×800 resolution and low
performing integrated graphics chip. Until today, I was running the
GNOME 3 desktop environment on it. Unlike most people (or perhaps just
a loud minority), I like GNOME 3. However, I wanted something that was
both less graphics intensive and more keyboard driven than GNOME
Shell and Mutter.

Someone on IRC told me about StumpWM, a window manager written
entirely in Common Lisp. I had heard of StumpWM before, but back then
I wasn’t an Emacs user and I’ve never really stuck with any tiling
window manager that I’ve tried (DWM, Awesome). Now that I know the
power of a fully programmable environment thanks to Emacs, I decided
to give StumpWM a try. After some initial pains trying to get it to
run, I am now using it very happily.

Here is what I had to do to get StumpWM running on Debian Wheezy.

  1. Install StumpWM

    sudo apt-get install stumpwm
    
  2. Create an .xinitrc file in my home directory with the following
    text

    exec stumpwm
    
  3. Workaround clisp "component not found" errors

    I could not get StumpWM to start until I created the following
    symbolic links:

    ln -s /usr/share/common-lisp/source/stumpwm/stumpwm.asd /usr/share/common-lisp/systems/stumpwm.asd
    ln -s /usr/share/common-lisp/source/cl-ppcre/cl-ppcre.asd /usr/share/common-lisp/systems/cl-ppcre.asd
    
  4. Start the X server

    startx
    

I use the GNOME Desktop Manager, so I also created a session file for
StumpWM in /usr/share/xsessions/stumpwm.desktop.

[Desktop Entry]
Encoding=UTF-8
Name=StumpWM
Comment=This session logs you into StumpWM
Exec=stumpwm
TryExec=stumpwm
Icon=
Type=Application

I hope this brief installation guide can be of use to one of you out
there in Internet land. Perhaps in the future I will write an article
about customizing StumpWM with Common Lisp.

From the blog dthompson by David Thompson and used with permission of the author. All other rights reserved by the author.

Find Me on Diaspora

With all of the recent news about the NSA’s widespread spying, I have
decided to ween myself off of proprietary, centralized web
services. Facebook, Google, and other such corporations hold onto
massive amounts of our data that we’ve willingly given to them via
status messages, "like" buttons, searches, and emails. Using and
contributing to free (as in freedom), decentralized (like email) web
services is a really great way to re-establish control of our
data. These services rely on many small, interconnected nodes to
operate, rather than a monolithic website that is under the control of
one entity. If the distinction between centralized and decentralized
isn’t clear, consider how email functions. There are many email
providers to choose from. Users can communicate with others that
choose to use a different email provider. This is how web services
should work, but unfortunately very few work this way now.

The centralized web application that I spend too much time using is
Facebook. I have knowingly given Facebook a "frontdoor" into my life
for years now and I’m ready to move on. I think that the concept of a
"social network" is fun, so I wanted a Facebook replacement.
Fortunately, there is one: Diaspora.

Diaspora is a free, distributed, social networking web application
written in Ruby using the Rails framework. Diaspora is a community-run
project. Its success depends upon users, developers, technical
writers, user interface designers, etc. investing their time and/or
money into making it better. The Diaspora network is broken up into
many servers, known as pods. Users have the choice of which pod to
store their data on. Pods assert no ownership over their user’s data,
unlike Facebook, and do not use that data for targeted
advertisements. Diaspora is still a rather young project, but it does
everything that I need it to do. Goodbye, Facebook!

Since I’m a programmer, I naturally wanted to hack on some code and
contribute. The main developers are very friendly and give great
guidance to newcomers that want to help out. Every Monday is a "Bug
Mash Monday", where a list of open issues is presented to entice
contributors to resolve them. In the past few weeks, I have made two
contributions to the Diaspora project: a bug fix and a small
feature
. Diaspora is very hackable and I encourage other developers
with Ruby/Rails and Javascript knowledge to join in.

TL;DR: Diaspora is great. Create an account. Check out my profile. Start
sharing. Happy hacking. 🙂

From the blog dthompson by David Thompson and used with permission of the author. All other rights reserved by the author.

My First Real FOSS Contribution

I spend a lot of my free time writing code. I usually work on my own
personal projects that never really go anywhere. So, I decided to take
a detour from my normal hacking routine and contribute to an existing
free software project. My contribution was accepted awhile ago now,
but I wasn’t blogging then so I’m rambling about it now.

It’s wise to find a project with a low barrier of entry. An active IRC
channel and/or mailing list with people willing to help newcomers is
ideal. I remembered hearing about GNU MediaGoblin at LibrePlanet
2012, so I decided to check things out. MediaGoblin is a media sharing
web application written in Python. Their bug tracker marks tickets
that require little work and don’t require a deep understanding of
MediaGoblin as ‘bitesized’.

I chose to work on this ticket because it didn’t require any
complicated database migrations or knowledge of the media processing
code. I added a new configuration option, ‘allow_comments’, and a
small amount of code to enforce the setting.

Eventually, the ticket got reviewed and Christopher Webber
(MediaGoblin’s friendly project leader) merged it: "Heya. Great
branch, this works perfectly. Merged!"

It was a very small change, but I was happy to finally have some
actual code of mine in a real free software project. I have a strong
passion for free software and the GNU philosophy, so it’s really great
to participate in the community. My job as a professional software
developer eats up a lot of my time these days, but I hope to find the
time to continue hacking and contributing.

From the blog dthompson by David Thompson and used with permission of the author. All other rights reserved by the author.

A Quick Review on JILOA Course.

First of all, i would say this course was my first experience of working in a real working environment; and it helped me to catch a proper image of how everyone work together to get a big project done. It is true that in programming, we may not know what we are building until all the codes are integrated and form a product. A big project would be broken down into several different parts and each part would be handled by a group of programmers. Then, every group has its own task to do. Some parts of the project do not need to know how the other parts are going. Team-working, brainstorming, setting up tasks for each group are all the important initial steps of the process. That would help to work efficiently.

A project leader or advisor is also very important to help get the project’s process on the right track and make it move as quick as possible. 

Beside those, real working environment involves clients. We need to stay informed and updated with them. Although clients do not always know what they talk about programming, we have to focus on what they would like the product to function so that we can both come to a happy ending of a contract.

Communication is the very important thing to get the project done efficiently. Beside emaillist, Git and GitHub were new to me and they were great tools. They are also the great tools for out teams to manage, share, and contribute on our project. I would learn more about them.

Since our big project was broken into smaller parts and each group had a different part to work on, besides my team’s work, i did not know about other teams’ works – how they had their tasks finished. there were many things that i would like to work on but i did not such as data base, server, user interface, and testing the codes. However, the priority goal of the course was to learn how to work together in a real working environment, to have the ability to process, analyze corporate, and get the job done; and i felt like i already had the achievements for those from this course.

For this course, i wish i could know more about git and the language used for the project before. 

For the weekly post, we were asked to post weekly, but with the lack of programming languages, being stuck on how to get problem solved, some weeks i was on the same thing. Rather than just post a sentence to say about that, i waited until i got something done to post. That caused the lack of my posts.

 

From the blog daunguyen10&#039;s Blog » CS-WSU by daunguyen10 and used with permission of the author. All other rights reserved by the author.