Friday, January 25, 2008

What I've learned from building my first version of a professional portfolio

So while building my professional portfolio I've discovered that I still have a lot to learn. I really thought I had learned a lot over the years at UH but when I try to put it down on "paper" it seems that I really learned quite little. It's not that I haven't learned anything or that I haven't put in any effort. It seems that compared to the rest of the world I still have quite a bit of my own learning to do.

Right now all I can really say is that I've had experience in writing in Java, C/C++, assmebly, and SQL but I haven't really done anything with real merit. I haven't worked on a open source project, which I plan to do, that actually required me to go beyond what I know in a classroom or feel that I can accomplish in a classroom setting. It seems like all the project I've been working on has already been done by someone else and I'm just rediscovering their steps. I feel that I need to go beyond my comfort zone and dip into something where I would have no idea how to go about it and find a solution to a problem.

I know right now that I have the potential to learn any language and excel at it but I haven't found a driving force for me to go out and just learn it. I know that it isn't that simple and that along the way I'll have to learn a lot about language theory and business practices but then again there is the internet and that's what it was originally created for, no?

One of the blog that I've been reading religiously is Jeff Atwood's "Coding Horror" which is a great blog that talks about all the problems that he runs into in the industry.

http://www.codinghorror.com/

Another great video that was emailed to me during the course of last semester class is this video on programming languages and web interfaces.

http://oodt.jpl.nasa.gov/better-web-app.mov

He goes on about how J2EE is not the best for web interfaces because turn around time is absolutely vital to development.

There is also Ninian Wang's blog who is a programmer for Google. I happen to stumble upon this page one day and been reading her blog ever since. She really talks more about life but there are a few gems here and there that relate to Google and how it like working for such a huge and well known company. This is where I want to be someday, soon. I hope.

http://niniane.org/

I hope that one day my blog will be worth reading for other budding developers. Hopefully I'll actually have something worth while to say then.

Sunday, December 9, 2007

33.PrimeDirectivesRedux

1. Interactive Development Environments (Eclipse, VisualStudio, etc.)

For the first Prime Directive, an IDE helps to develop a system on the code level. It checks the syntax and eliminates repetitive procedures so that a developer can efficiently release a product that accomplishes a useful task. It really serves no purpose for an external user so it does nothing for the second PD but for the third PD, an IDE is great for developers because coding style can remain consistent throughout the code. It also allows an external developer to quickly make sense of the source code and efficiently edit the code because the IDE lets them develop code on an environment customized to their preference.

2. Coding Standards and Coding Standards Compliance Tools (Checkstyle, etc.)

Coding standards satisfy the first and third PD because it helps to keep code easy to read and edit. If everyone was to code in their own way, then external developers would have a difficult time making sense of the code and would waste that much time and the motivation to actually work on the code. Compliance tools help to keep code bug free and to assure that the quality of the code is at release level.

3. Build Systems (Ant, Make, etc.)

Build systems are a great tool for saving time. They basically do the job of compiling all code and keeping version control. They check to make sure that all code that has been edited is recompiled when needed and make it simple to build and pack a project. It is also helpful because different IDEs can work together on the same code. This is a great benefit to all developers old and new so it satisfies all PD. Users will most likely benefit from the fact that either the program comes packaged and ready to go or compiling the program and running it is a one step process.

4. Automated Quality Assurance Tools (PMD and FindBugs, etc.)

These tools help to keep code bug free and running smoothly. Thus they affect the first PD because those tools make sure that the task being accomplished is actually done right. External developers benefit from these tools as well because they can make sure that the code they edit is at the same level of quality and as bug free as when they started. External installers don't really benefit much other than knowing that the code works. Maybe not completely bug free but most common errors are weeded out.

5. Black and White Box Testing

Black and White Box testing help developers find bugs that might come up in their code. Black box testing try to categorize user inputs and runs tests to see if those inputs will break the system. White box testing shows developers which lines of code are executed during tests. This ensures that certain methods are called when they need to be called. This satisfies the first PD because it ensures that a task is accomplished successfully. This also satisfies the third PD because external developers can also ensure that their code is doing what they think its doing. Installers don't really worry too much but users will want a program to do what it’s supposed to do. So it satisfies all three PD.

6. Automated Testing Tools (JUnit, HttpUnit, etc.)

Automated testing tools make it easy for all developers to create tests. Tests ensure that a program works the way it is intended thus it affects all three PD. It helps to develop a quality program that will accomplish a useful task, then users can install and use a program as it is intended, lastly external developers can enhance the code and run more tests. These test show that the original functions work as well as the new functions.

7. Configuration Management (CVS, SVN, etc.)

Configuration Management helps groups of developers to work on a program without having to worry about trampling over each other’s code. These programs help to ensure that code written in one file from one developer can be merged with code that was written by another developer at the same time. Thus files can be edited without worrying about it being out of sync with the rest of the files. This helps out all developers but does little for users and installers because they will probably never use these tools.

8. Issue Driven Project Management

Issue Driven Project Management allows all the work that must be done on a program to be divide into “issues” that can be resolved to form a milestone. This helps to keep developers up to date on the difference between versions and the evolution of the program itself.

9. Use Cases

Use Cases are an example of just how the program works to accomplish a task. This sets up the design process so that developers can model the code after this case. It shows the developer how to make the code. The end result is a program that works the way is was intended leaving users satisfied.

10. Software Review

Software review helps developers look through their code and ensures that the code is following the design. It begs developers to ask other developers to look at their code so that both developers can become better developers. They can show each other how things could be implemented better or more efficiently. It also shows a developer that he can make mistakes but learn from them. This is essential for all PD because although developers are the ones carrying out this process, users benefit with a robust program.

11. Agile Methods (XP, Scrum, etc.)

The agile methods change the way code is being developed. Instead of wasting time looking and waiting for requirement, two or more programming can just get cracking on some code and incrementally build a better system. In the end, the code almost always turns out better, which also leads to happy users.

12. Open Source Licenses (GPL, CPL, etc.)

These licenses help to develop and grow the open source community by protecting what they have developed. Each license has it own set of restrictions and while some are very tight, others are very loose and viral. This helps out the whole open source community because they can step on the shoulders of giants and release ever better code. Although the whole situation can be convoluted at times, there is proof that this works. We have to look no further than Linux itself.

13. Online Hosting Services (Google Project Hosting, SourceForge, etc.)

Online hosting services help out the development community by working along with things like the open source licenses. Online hosting services makes it easy to access source code so that other developers can add to or learn from it. In the end, it helps to generate better code and program

Team Yellow MyIsern 2.0 Review

Installation Review:

Right off the bat, I was able to download the distribution file but I had difficulty opening it. I used window XP's default unzipping tool but that didn't work. Finally after the whole team gave it a try, we found that if you used winRar to open the file, then it would uncompress.

There was also no installation guide so I had to resort to using the developer's guide which was barely helpful. I was able to download XAMPP and Symfony with no problem. I also extracted both with ease. I was also able to setup XAMPP easily using the developer's guide. But when it came to installing symfony, I was confused as to what to do. I didn't know how to install symfony and the webpage provided was also confusing and set for a unix user. The symfony site asks to uncompress the symfony download into the root web directory of the server yet I have no idea what folder that is. The developer's guide basically assumes that you can install this program easily, which I couldn't do.

The main errors that occurred were getting PEAR to work. I tried all the commands provided on the symfony site: pear install symfony/symfony, pear config-show, and pear update-channels. I especially had trouble with pear update-channels because it just wouldn't do it. It found no channels. So I went ahead and tried, pear update pear and that gave me even more errors. I moved on to pear upgrade-all and it told me that there was nothing to update. I went back to beginning and tried all the commands again. pear update-channels finally worked! But then crashed in a horrid blaze of fire.

I tried to install phing after that and much of the same occurred. Entered a command, crash. Enter another command, crash. Go back to step 1 and semi-work then crash horribly. The entire team tried to run this application, at the same time, but we all had the same results. I actually got the furthest because for some strange reason XAMPP actually WORKED for me. Everyone else was stuck there.

Finally after two hours, I got pear install symfony/symfony to work. SUCCESS! Only to find that somehow my ad hoc ways of getting this program to install seriously screwed up my localhost page. Defeated, I wiped the tears off my face and hit the close all tabs button.

I actually googled (has google finally made itself a verb?) the subject earlier in the process only to find out that everyone shared much of the same problems as me. Apparent there really is no support for windows/xampp/php/symfony. Those that could get it to run used many ad hoc methods to change things here and there. There even a webpage that shared my sentiments.

http://trac.symfony-project.com/wiki/WindowsXPDevelopmentEnvironment

This person actually tells you to do something knowing that it will fail. Then he goes around and tells you how to fix it using heuristic methods. In the end, I still failed. I consider this a complete failure because it utterly defies Prime directive 2. There really is no easy way to install Symfony. Especially with the Prime Directive Redux questions to answer, finals to study for, and sleep deprivation. I'm actually angry right now.

I do not blame Team yellow for this. I blame Symfony for making it so hard to use. I'm sure once I spent a lifetime or two looking through the thousands of wikis that describe how to install symfony with this program or with this environment or any combination of the above mentioned items, all of which don't work in my opinioin, I might actually get it to run. Then maybe go on to review it.

I was also not able to contact Team Yellow for their help.

Code format and conventions review

We really don't know php at all so we can't really review the code format or the conventions.

Test case review

We could not get the page to run. At all. Therefore we cannot run the tests.

User Interface review

See above.

Summary and Lessons Learned

I've learned absolutely nothing. This was a waste of my time and very frustrating. I'm still angry. But I hope that I at least made this review a fun and delightful piece of reading. Enjoy, cheers!

Thursday, November 15, 2007

29.MyIsern-1.3-review

1. Installation Review: Myisern team Red

I was able to download the installation file through their google project hosting site but none of them actually had a blog page that easily pointed to it. I can't really say much because my team didn't do the same since it wasn't assigned to us but it would have been helpful. After downloading and unzipping the file I realized that there really isn't any way to start this program without having to use ant to deploy it. But there is always the option of uploading the war file to your tomcat manager. I decided to just run it from ant and then uses the tomcat manager to access the website. There didn't seem to be much a guide either but there was a README file that contained what the site could and could not do. Lastly I did run ant -f verify.build.xml to run all the tests and it looks like all the tests passed. Emma showed:

Class 60%
method 25%
block 29%
line 26%

2. Code format and conventions review:

Right off the bat there were many variables that weren't being read according to Eclipse. Otherwise the code and the javadocs actually seem neat and tidy. There are comments in place of missing code and it is all easy to read. Everything seems to be up to standards and coding is modular which helps readability.

3. Test case review:

So far the only tests that exists where 4 tests that ensure that the three adding pages and the main menu page showed up on the test host. There was also a test for the model that made sure that the instance of the model followed the singleton method. Other than this there were no other tests.

As for breaking the buggah, the page had many links that didn't work, such as all the editing pages as well as a few buttons that didn't do what it said it would do. The print buttons for Organization and collaboration didn't work. In the read me file it did state that the editing functions still weren't developed so I can see why those pages didn't work but I couldn't see why the print button didn't work.

On the other hand, the adding functions did work and I could see it added after brought up the display page. Otherwise I had no idea if I added the item or not.

4. User Interface review:

As for the UI, it was texted based with no graphics. It was a bit hairy to read and a bit confusing but this is still a work in progress. I could see it going a long way with a simple UI using css or even basic html. As for screen real estate, being text based it used screen real estate very well. Sizing the screen to just about any respectable size still still held the interface clearly. Lastly, there are many improvements that can be made here aside from the basic html/css layout design. Everything seems to be aligned to the top left which is great for resizing the screen but horrible at full screen.

5. Summary and Lessons Learned:

The things that I've learned is that looking back on my own program I can see how a simpler approach might actually be better then complicated css/html code thrown everywhere. It might not be the prettiest of all the projects but it does get some of the jobs done with mild discomfort. I also realized how important it is to actually give feedback to the user after they have accomplish a task such as editing or adding a researcher. Without letting them know that the action was completed, it just adds more steps to actually getting through the page.

Sunday, November 4, 2007

26.StackStripesExtension

At first, I thought that this was going to be a horrible assignment that would take me all week to do and that I would have to slave over it for hours. But in actuality it was pretty simple. It took a while to get used to but that could be said for just about any new piece of software. So, of course, I had the basic hiccups when it came to installing tomcat and stripes. Tomcat was a bit harder since we had to edit the conf directory files. But all in all it was pretty easy to get going.

I think the hardest thing was just getting used to using tomcat, making sure that it was running, restarting it after Emma, restarting tomcat every time we made changes and such. The actual code wasn’t very hard at all once you grasped the theory behind it. It just took me a while to grasp that theory. It wasn’t as hard as our previous assignments where I had to trace over all the code but it was a bit challenging. Overall, I’m happy to say that I’ve completed all the tasks with enough time to get some sleep!


here's the link to my program...

http://www2.hawaii.edu/~eykim/stackstripes-1.0.1106.zip

25.WebAppQuestions

1.) Explain in your own words the meaning of the web "request-response cycle".

The request-response cycle is basically the cycle where a user looks at a page, clicks on some object which then tells the browser to send a HTTP request to the server. The server in turn takes the request, works it out and sends back a response. (Wash, Rinse, Repeat.)

2.) Explain how servlets facilitate processing of the request-response cycle.

Servlets are basically java classes that reside on the server. They process the information sent by the user and returns data accordingly. This allows for dynamic web pages.

3.) How do you login to the Tomcat Manager?

First, tomcat must be running. Then go to the localhost manager page on your web browser or through ant. (http://localhost:8080/manager/list). Enter the username and password that was set in the tomcat conf directory.

4.) What is the Tomcat Manager used for in the StackStripes application?

The Tomcat Manager is used to deploy the StackStripes Application on to tomcat. Since tomcat is password protected, we use the manager to log in and deploy or undeploy the application.

5.) What is the directory and file layout of an installed web application like StackStripes? (This is NOT the same as the directory and file layout of the StackStripes distribution!)

Inside StackStripes is…


Stackstripes\index.jsp //homepage
Stackstripes\META-INF //meta info
Stackstripes\WEB-INF //web info


Stackstripes\WEB-INF\web.xml // xml containing configuration info


Stackstripes\WEB-INF\classes //classes
Stackstripes\WEB-INF\classes\commons-logging.properites //config info
Stackstripes\WEB-INF\classes\log4j.properites //log4j info
Stackstripes\WEB-INF\classes\StripesResources.properites //stripes resources info
Stackstripes\WEB-INF\classes\edu/ // all the things I’ve written

6.) How do you build a war directory structure in Ant? Where is this accomplished in the StackStripes application?

The stack Stripes application builds the war directory through ant in the build.xml file. To build the war directory you need the location of the directory to be created, the web xml file with all the configurations, and all the side info like classes, libraries, and file sets.

The build.xml file should set all these attributes accordingly.

7.) How do you install a war directory in a running Tomcat server? What information does the Ant task need to accomplish this?

Installing a war directory in a running Tomcat server is as simple as just copying the war directory into the webapps folder in Tomcat. The webapps directory is found in the home directory for CATALINA. This can also be accomplished in ant but just setting the destination directory to the webapps folder.

8.) What is the "Model2" architecture? What are its advantages?

The model2 or MVC (model – view – controller) architecture is a architecture pattern that consist of a large amount of data to the user i.e. the model and represents in it a view i.e. interface so that the changes do not affect the data. This is done through an intermediate called the controller. The advantage is it solves the problem of decoupling data access from user interaction.

9.) What are JSP pages? How are they related to servlets?

JSP pages are Java Server Pages and are basically html pages with JavaScript embedded. The JavaScript is compiled into a servlet, and the servlet handles, processes, and return data to the html page where the script is located. This allows for dynamic html pages.

10.) Why is there a delay when retrieving a JSP page for the first time? Where is the Java code for that page stored?

There is a delay when retrieving a JSP page for the first time because the server needs to compile the JSP pages into a servlet. Afterwards the servlet is held within memory on the server for as long as needed. The Java code for that page is stored within the page itself.

11.) What are JSTL tags? Why are they useful? What is an example JSTL tag from the StackStripes system?

JSTL tags are JSP Standard Tag Library tags are simply tags that surround core functionality commonly needed to make dynamic html pages. They are useful because they are in XML standard format and work well in html. This avoids the need to write the java code into the html making the html code easy to read and edit by someone that does not know Java.

Example:

${element}

12.) What are Stripes tags? Why are they useful? What is an example Stripes tag from the StackStripes system?

Stripes tags are basically html tags that allow the linking of button and fields on a webpage to their appropriate java classes. They are useful because they link a button or such to the respective get or set function in java which saves a lot of code.

Example:

13.) What is HttpUnit? How is it different from JUnit? Why is it useful? What is an example use of HttpUnit from the StackStripes system?

HttpUnit is a java class that allows a programmer to access web sites without a browser. It is useful for testing any Java code that deals with web pages because it can go beyond JUnit because JUnit will only test java code running on the client.

Example:

WebForm pushForm = response.getFormWithID(PushForm);

WebRequest pushRequest = pushForm.getRequest();

pushRequest.setParameter(numToPush, "1");

response = conversation.getResponse(pushRequest);


14.) What needed to be changed in order to implement the Double It button? What didn't need to be changed? What did you learn about the MVC design pattern from this exercise?

All that you needed to do was to create a DoubleIt method for the Action bean and a double it button in the index.jsp file. Nothing else was needed. I actually didn’t learn too much about the MVC design pattern through this other than the button and the method needs to have a relevant link.

15.) What are the equivalence classes that need to be tested for the Double It button?

The equivalence classes would be to test on an empty stack, a stack with one or more object, and a stack with a ridiculously large amount of objects.

16.) Provide two screen images of your new StackStripes application with the Double It button, one showing the page before and one showing the page after hitting the "Double It" button.









17.) What is the singleton design pattern? What is an example of its use in StackStripes? Why is it needed?

The singleton design pattern is a pattern that restricts the instantiation of a class to just one object. This is needed because we want all users to interact with just one instantiation of the stack class. This way all the users will have and work on the same information even through multiple “views” across the internet.

Example:

private static StackModel theInstance = new StackModel();
private ClearStack stack;
private StackModel() {
this.stack = new ClearStack();
}

18.) Some of the StackStripes tests exercise code on the "server side", while others exercise code on the "client" side. Which test classes exercise code on the "server", and which exercise code on the "client"? How does Emma deal with this to create appropriate coverage data?

The file TestStackModel.java exercises test cases on the client side while TestStackActionBean.java exercises test cases on the server side. Emma deals with this to create appropriate coverage data by shutting down Tomcat.

19.) Running 'ant -f junit.build.xml' results in the following target invocations: tomcat.check, tomcat.undeploy, compile, war, tomcat.deploy, junit.tool, junit.report, junit. Explain what each of these targets do.

Tomcat.check

This checks to see if tomcat is up and running.

Tomcat.undeploy

This undeploy the application from tomcat.

Compile

Complies the code, what else?

War

This builds the war directory.

Tomcat.deploy

This deploys the application on Tomcat.

Junit.tool

This runs the JUnit test on the given code.

Junit.report

Reports any errors found in the JUnit tests.

JUnit

This runs the Junit.tool and Junit.report tasks. It will display errors if found.

Monday, October 22, 2007

21.MyISERN-1.2

There were many things difficult about this project. A lot of the issues were from the XML itself. The first issue was trying to figure out how to marshall things back into XML format in general. After our first meeting, we were able to figure this out with very little difficulty. We thought that this project would be easy but in actuality, I ended up losing a night's sleep just to finish all the tasks. I'm proudly, and very wearily, able to pronounce that we have finished all the tasks. Although I'm not sure if this is the most robust piece of code I’ve written however.

More difficulties arose from creating all the different adding function. Each in itself wasn't very hard but it was very tedious. I believe each one took us numerous hours because as we were writing each one, we kept running into slight problems with omission errors and just fixings those errors took many hours. I've learned having a clear and complete design before going off and writing code would have helped us tremendously. I can honestly say that when I started to code, I went off in my usually "I'll think of it as I'm writing it" kind of mode. This eventually lead me to the "Oh, god. I'm going to kill myself soon..." mode.

With each section being so long and requiring many methods and variables here and there, I often found myself stuck with merging conflict with my partner who was right next to me or generally waiting for him to finish his side of the code. We decided that since it took so long to write each section, we would split the work up. This actually led to more problems because we all kind of just jumped right into the code. I'll remember to hold a meeting where we go through the design of the code before we actually implement it.

The last and most excruciating difficulty was loading the XML files with all the researchers, organizations, and collaborations. Not only was it difficult to find all the connections in general, we all decided to split up the work and had a horrible time trying to merge everything together. At 4 in the morning, after doing all the work over myself, I finally got everything to work while developing carpel-tunnel syndrome in places I never knew possible.

But alas, in my semi-delirious state, I write this blog as my final testament to finishing this code that practically store another weekend away from me. Hurt, but proud that I could finish such a monstrous task.

As for organizing the group and carrying out the work, we went about it in our normal way of choosing a starting position and coding our way to each other. This definitely was not the best way to carry out this task. A united front would have saved us much time. Deliberately holding out on the coding and planning everything ahead of time would have been the best solution. I have learned another lesson yet again, the hard way.


And here's my link to our program: http://myisern-1-green.googlecode.com/files/myisern-xml-1.2.1022.zip