Back in the U S of A, and working

So, I have been back from my trip for a few days now, and I have a lot of interesting stories and the such because of it. So, I mentioned that I was out of the country, but the specifics are that I was in Buenos Aires, Argentina for about a week, and I was in Uruguay for one day as well. I was there with my all mens choir The Singing Statesmen from the University of Wisconsin Eau Claire.

The city of Buenos Aires is a great place. Our hotel was located in one of the best parts of town. We were about a block away from this huge obelisk that is the centre of most of the celebrations that happen in the city. This was especially nice during new years eve. We got to celebrate new years eve on a balcony of the hotel where we could see this obelisk. When midnight hit, we all went down to the obelisk and sang by it. This was a great time and one of the locals recorded our singing and we found it on youtube when we got back.

Besides the place we got to stay, we also got to sing in quite a few unique environments. The first was in la Catedral de la Plata in la Plata just outside of Buenos Aires. This was a very interesting place to sing because the ceiling was so tall that we had about a 3 second delay from when we would sing to when the sound would get back to us.

Overall, it was a very great trip and an experience of a life time. I am back at work now, and have been working on a few interesting things lately. I got to work with my first mailer for an application this week. All I have to say is that making a mailer with Ruby on Rails is a lot easier than I would have expected a mailer to be. All it really is, is you design the mail as an html document, and just use that as the body of you email which is extremely easy. Then, writing the code to call the mailer is very simple as well. In the future, when I hear I need to make a mailer, I will not worry about it because it is quite easy.

My next interesting thing that I get to work with that I haven’t used before is exporting data from an application to an Excel spreadsheet. From looking at what I have to do, this looks like it will be easier than I thought as well. Lately, it seems to be a trend with Ruby on Rails that I always over exaggerate how hard something will be, and it almost always ends up being easier that I would have expected. I think that is mainly due to the language, but I would assume that part of it has to do with my newer ability to trust myself while coding now. That has been one of my flaws for a while. Lately however, I have found that if I am confident and ask for help when I am stuck on something everything works out better for all parties involved. I am glad that I finally started to learn this and get over my timid approach to coding that I used to have.

What you can, and can’t plan for

Lately, I have been finishing up classes for the semester, and doing a lot of studying, and a lot of finishing up projects. I have learned a few very interesting things both about myself, and about finishing up projects. First off, I have learned that sometimes glossing over the simple things can hurt you in the long run. I have been noticing lately that I tend to get the integrated idea of things. For example, if you were to give me a bolt and a nut, I would completely understand that they are to go together, and because of that, they can hold something together. However, if you were to ask me what the purpose of either one of the individual pieces was for, I would tell you that they are to be used with their pair to complete a goal. This type of thinking has been hurting me lately. So, I have been slowing myself down when I learn something, and asking myself, what is the purpose of all of these things individually, before asking the question about what the process of them are together.

The other thing that I have been learning lately, especially with projects, is that every issue can be in one of three different categories. They can either be something you can plan for, something you should have planned for, or something that you couldn’t have planned for. I have had a lot of these issues come up lately. First off, I have gotten ahead of some issues, but asking myself, and then the client, what happens in case A, or is this situation ever possible. Those types of questions have been helping focus how one of the projects I have been working on have been going. I have been able to figure out the scope of this project earlier, so I don’t end up doing extraneous things that aren’t needed.

The other type of situation, those you should have planned for is something that I have been noticing with a project that I am working on that is nearing completion. There are a few things that have come up in meetings, where we both looked at each other, and were confused about how something was working, and it ended up being an earlier miscommunication and if I would have at that time, asked about specific edge cases like I am now doing with the newer project I am working on, these problems would not have come up. This was a failure on my part that I have learned from that has helped me a lot.

Lastly, there are those cases that you can’t plan for. These are the situations that are never fun to see. The other day, I was out at a clients, installing the completed version of a project for them, and an issue with the password for their local database had been recently changed, so the program wasn’t able to connect to it as desired. This wasn’t a hard thing to fix, but it was an example of one of those issues that was thought should be fine, as the database was used, and it was shown working to us, where something as obscure as the password being changed so the connection wasn’t getting made wasn’t something we had thought of, and the fact that it was a local database meant that the password that was used previously to connect would just get changed. This is an example of my least favourite issues, the one that shows up while you are trying to show your product, but at the same time, these are the issues that I don’t mind dealing with. I like thinking on my feet, and figuring things out while the pressure is on, is something I would like to say I am great at, and I feel it really makes me use those critical thinking skills that sometimes like to try and hide away.

Anyway, That is what I have been doing in the last month or so. Over the next few weeks I will be heading down to Argentina and Uraguy, so expect an update after I get back, but probably not one before I leave.

Some new developments

As of late, school has been taking over my life. I have had assignment, after assignment due back to back so I have had little time to do much about it. I have been able to learn a bit about things I didn’t know however. The main class that I have been doing a lot of work in, is Operating Systems. I have been learning a ot of low level ideas along with programming some of them in this class. It is a bit more difficult than I expected, but I am learning a lot.

Otherwise, I am working on preparing for my concert on Friday. I have one song yet that I need to perfect my memorization of, but other than that, I think things will go well. After that, I will be touring next Wednesday through Friday with the same choir around to different high schools in Wisconsin which will be a blast also.

With work, I have been working on a new project while finishing up details with the previous one I have been working on that is almost done. Having the experiance of starting a project from scratch, being allowed to make it my own has been really rewarding for me. Anyway, I need to get going, as I have a lot of stuff to finish up today before the day it done, and there are only so many hours left.

A musical few weeks

In the last few weeks, I have had a lot of music in my life. I am in a mens choir, and we have had a few small performances in the last few weeks here. (Including another one this evening)

In between my bouts of singing lately, I have been doing some awesome things at work. The huge project that I have been working on for a while has the potential to be done very soon and I know I am not the only one that is happy for this. While working on trying to finish up that project, I have been working on my skills in problem solving. We have been finding other small issues with this program, and have been trying to figure out those interesting solutions because we are trying to get things done. Now, I am not saying that we are copping out and finding the quick fix answers. I am saying that we are running into those issues that normally you say hey, I know how to do this, but this wasn’t something that we thought of at the beginning of the project, but now, you have the majority of the project up and running, how do I implement this without changing the majority of things that have been finished. So, that has been interesting lately.

Also, I have gotten a new, from the void, project which I have been waiting for. I haven’t really had a project that I got to start and finish by myself yet at work, they have all been other projects that people have worked on doing maintenance, or continuing development from where they left off. Well, I shall let you know how that project will be treating me in a few weeks.

As for school, I have my first CS assignment due. It was to implement and mirror a Linux shell for the most part. The project turned out to be quite interesting. We had to demo the project today, and we did pretty well, and were satisfied with our results. That is what has been happening with me the last few weeks.

Talking, for the first time

Tonight, we have a Ruby user group meeting here in Eau Claire. It is a pretty big meeting, as we are trying to get a lot of people there to show them first, what a user group does, and second, the awesomeness of Ruby and Ruby on Rails. Due to this meeting, we are having a few quick speakers, and then lighting talks by other members. I am giving one of these lighting talks.

As of right now, 10ish AM, I still have to decide what I want to talk about. This isn’t due to the fact that I am a slacker, or lazy, this is due to the fact that I have a bunch of things that I want to talk about, and I need to narrow it down. At first, I wanted to show people how quick and easy it is to get a simple project up and running. I don’t think I am going to do this because it has been shown a few times in talks in classes to some of the possible new members. Next, it was suggested that I do a talk about HAML because as you have seen, I have taken a pretty solid look at it. I don’t think I am going to do this because there are so many new people that might be coming to the meeting this evening. So, I think I am going to just talk about what I like about ruby, what I do with it on a daily basis, and why I enjoy using it so much. I think this is a good topic because this way, I can still show enthusiasm while not feel like I am either talking down, or over, someones head. This way I can just talk to them, and explain my experiences with it instead of trying to teach, which can be done at a meeting later, when we know who is interested in what topics.

Back in the Swing of things

So, school started almost a month ago now, and I have been quite busy with the start of school and have fallen off the face of the earth a bit. I am back now however, so never fear. In the past month or so, I have been getting a lot better at dealing with clients. I have a client that I have been working with for a while and our meetings are completely productive, and we are a lot more clear with each other when talking about what needs to be done on a project.

I got another client for a project that my Senior Software Engineering class is working on, and we had our first meeting yesterday. Everything went beautifully, and we know exactly what we expect of each other. So, things have been going well for me as of late, and I will be updating this once a week again starting now as I have found some time.

Recent Learnings

In the last few weeks I have done a few new things are work for the first time.

First off, I learned how to do file upload with rails. To do this, I used a plug in called paperclip. It was quite easy, and straight forward to use. I wouldn’t imagine about how to do it without such a plugin. What paperclip does, is it takes multiple pieces of information from the file, in my case it was an image, and saves them all separately, but allows you to refer to a single object instead of all of the individual pieces.

Besides file upload, I also learned how to do authtication with a CAS (Central Authentication System). It was quite easy as well. I used a plugin for doing this also. (It seems to be a trend lately, and also a very nice way to learn how to do something without banging your head against the wall) The plugin that I used was one written by my boss for doing exactuly what I needed to do.

Its like a Glade (plug it in)

So, due to needed some specific functionality today (June 10th, yes I have been slow at getting this up), I made a plug-in for rails! The plug-in I made was quite simple, but it solved a great problem for me. What I needed, was a way to check if an object has any associated records, because we didn’t want to allow the deletion of it if it was associated with anything. So, I asked my boss about how to go about fixing this problem the easiest way, and he suggested that I write a plug-in, and away I went.

Now, being as I had never written a plug-in before, I did get a bit of help with it. So, my boss and one of my co-workers did a lot to help me with writing this plugin, but now that I have one down, if the need for another should arise, I have a much better understanding of how to go about it.

Well, I shall make the bloggers promise finally now, as most people assumed I would. I shall update my blog much more often than what has happened previously.

Also, if you want to take a look at the plug-in, and give me feedback, or have any ideas of how to expand it feel free. The plugin can be found here.

haml, an objective view

In the last few weeks, I have been introduced to haml, which is a different way to write you views in rails. My initial thoughts about it weren’t so keen, so I wanted to take a more in depth look at it to see why people are switching to it, and why, or why not, to use it.

First of, I can see why people are switching to it. It is generally felt that it is a cleaner way to look at your views. For example, this is what something simple might look like in rhtml

<div id="profile">
 <div class="left column">
  <div id="date"><%= print_date %></div>
  <div id="address"><%= current_user.address %></div>
 </div>
 <div class="right column">
  <div id="email"><%= current_user.email%></div>
  <div id="bio"><%= current_user.bio %></div>
 </div>
</div>

The same code, done with haml would be

#profile
  .left.column
    #date=  print_date
    #address=  current_user.address
  .right.column
    #email=  current_user.email
    #bio=  current_user.bio

So, what is the first thing that you notice about the difference between these two? Well, the first one looks a lot like HTML with script tags, which is pretty much what it is. The second, looks a little bit like CSS at first glance. If we take a little closer look, we also see that in the haml example, there are no closing tages. What haml uses is very similar to python in that is uses white space checking to end things.

Some people enjoy this a lot, the fact that they don’t have to explicitly end things, but this is the first thing that bothers me about haml. It could just be the type of meticulous person I am, but I want to explicitly close things, and make sure that nothing is missed when programming. If I learned from python, I am pretty sure that this wouldn’t both me as much. Being that because I learned java as my first language, I even feel weird not explicitly using a return from a function (this throw me for a loop for a while in rails). I understand that this isn’t a very solid reason to not like something, but from a strictly person preference, I do not like this, however I do see where many would.

The second thing that bothers me about haml, is that a developer might not understand right away what it is doing. Many times have I worked with other people on projects at school, and a few programming contests, and what would mess us up the most is one of us not having the knowledge base for something and the other person trying to use skills and techniques that the other person doesn’t know. When doing some larger projects, many times the programmer will get a developer to do the views for the project, and then just fill in what they need to with script tags and the such.

Yes, I understand that at first glance, a developer might be able to read haml, and understand what is going on, but if you want to use haml for the entire application, they will need to learn how to write it. This may not be a big deal to some developers, but it might be to others. Basically when it comes to learning anything new, some people can pick it up quickly, but some might not be able to. I guess this maybe a moot point, but one I wanted to bring up none the less.

So, in doing a little bit more research between the two, I looked at what other people had to say about the two. There was really only one strong argument as why not to use haml, and it was due to the fact that it has to be reparsed before rendered and that it is a performance hit. Some metrics someone ran showed it at about twice as slow. This may not be a good argument for a lot of projects, but for those where performance matters, it is a very compelling argument.

So, personally, I don’t see a fantastic reason to want to switch to haml. I see its advantages of being cleaner, but also the disadvantages as well. I guess, I should try it on an app once, and see how I like it, and then use what works best for me because honestly, I don’t want to use something that is extremely uncomfertable for me, but if I happend to like it, then it might be something I would want to use more often. Once I give it a try, I will post my thoughts on it, but with the exception of the small things I don’t like about it right now, I can’t see a reason to dismiss it before trying it.

System.out.println(”Hello World”);

Greeting everyone. I would like to tell all of you a little bit about myself, and what this blog is about. For a while, I have been wanting to set up a blog, and now I finally got around to it.

First off, my name is Gary Crabtree, and I am currently a 22 year old college student at the University of Wisconsin Eau Claire. I am a computer science - software engineering major, and a psychology minor. This is the first place I ever learned any type of programming, and it all started with Java for me (hence the terribly tacky title). I have had a small taste of many languages, and design patterns, and that conglomerate of things that a computer science department will teach, but the most significant thing that has had an influence for me, did not actually come from class itself.

At first, I was slightly turned off to programming as it wasn’t what I thought it was going to be at all. Having never touched any code, with the exception of simple HTML, before college, going straight into the computer science department was a significant life choice for me. I had been good at the arts side of things. I was in choir, band, and theater, both musical and non musical, but I felt that why I enjoyed those things was because they were an escape for me from the “real world”. If I was going to go into any of those as a career, I think it would have lost its meaning to me. So, I figured I will always be able to find community theater, and choirs/bands wherever I go, and I decided to keep it a significant part of my life, but to pursue other endeavors.

I swayed my other options, and they came down to computer science, and psychology. So, I decided to go with computer science as a main focus as I felt that it would give me the best variety of options in careers after a degree with it. So, I proceeded to take classes at the university, homework outside of classes, and spending the rest of my time leisurely for a few years until one day, things changed.

I got a job for the university doing web development. I had done a bit of HTML as mentioned, and some simple things from classes as well, so I figured it would be a great way to earn some money as I was in need of some greatly. So, in the summer of 2007, I started said job doing simple static design work.  By the end of the summer however, I had started expressing interest in learning the application side of web design as well, and I proceeded to let me bosses know that if possible, I would like to move in that direction. So, towards the end of that summer, I started training in something that would greatly influence the rest of my college career, and undoubtedly, my life. What I speak of, is Ruby on Rails.

Once I started it, I didn’t understand why everyone advocated so strongly for it; it took me a good chunk of time before I would either. I didn’t get to fully do Rails work until almost that following summer due to other static projects that came up, and then I got to take another look at it. This time, I started to slowly see what was cool about it after a year of working with languages such as C/C++, Scheme, and Prolog in my classes. Slowly, over this previous year, I have gotten to spend a lot more time working with it, and it is leading me to stay with it in the future. Although I still have a lot to learn about it, I plan to continue working with it professionally when out of school as well.

I feel that I have gotten to tell you all about my story, and where I am coming from as well. This blog will be where I will talk about what I learn both with Rails, and other technologies either through school, work, or anywhere else.