Friday, December 27, 2013

When creating a project in django using the tutorial at https://docs.djangoproject.com/en/1.6/intro/tutorial01/, I was getting an import error when running at the command line which asked if I was on the correct sys path using this command?:

django-admin.py startproject mysite.

 ImportError: Could not import settings 'mysite.settings' (Is it on sys.path?): No 
module named mysite.setting

I tried various things including trying to set the environmental variables differently. I finally installed Python-2.7.6, an upgrade from Python 2.7.3 I was using, to solved the problem. To get a working system on Windows 8 I used Python 2.7.6, Django 1.6, msql-installer-community-5.6.15.0, and MySQL-python-1.2.4b4.win32-py2.7. The trick is to find versions that work together. This can be done by trial and error since it is not always easy to find documentation that tells you. I tried to use the most recent stable releases of Django, Python, and MySQL.
 
To start the development server I attempted to run: 
 
 python manage.py runserver
 
I got:
 
  from django.core.exceptions import ImproperlyConfigured ... configured. " 
"Please supply the ENGINE value. Check ". "settings documentation for more details.")
 
This led me to believe that I needed to go back to the mysite.settings.py file. I 
double checked my settings but found nothing to correct this error. I remember 
reading something about setting the DJANGO_SETTINGS_MODULE in the Environment 
variables. I created a DJANGO_SETTINGS_MODULE variable in the environment system. I 
set it equal to C:/python_projects/mysite/mysite.settings.py. That didn't work but 
when I was in the outer mysite directory on the command line I used: 
 
set DJANGO_SETTINGS_MODULE= mysite.settings
 
and after that ran 
 
python manage.py runserver 
 
and had no problems after that continuing through the tutorial. 
 
 So once again I have run into compatibility problems with updates of software. Each 
release is a little different enough to cause problems. Users need to be aware of 
these conflicts that can occur so they have something else to try when they hit a 
brick wall in developing. 

Wednesday, December 18, 2013

It has been a long time since I have posted on this blog. I attended a OPW intern meeting as an alumnae on the irc today. It was suggested I continue blogging here especially since I am still working some with JBoss as an unpaid intern. I am still having trouble with rhabdomyolysis. Last spring and this fall I fell and broke bones and ended up in the rehab hospital. Since I can barely walk I am looking for a telecommuting job. Unfortunately most jobs want you on site. I really need a paying job since I have unpaid medical bills.

The Navigational problem I was working on was solved by some one else. I moved on to rpc (remote procedure call) since there were several issues in the tracker concerning rpc. First I needed to build a rpc application to test to get a better understanding of rpc. I tried to build a rpc app using the Reference Guide for Errai. I got rid of all of the errors in Eclipse but was getting a run time error. I didn't know what was wrong. Finally I asked my mentor. He said put the project on Github so he could look at it. He fixed the project but there were still 3 dependencies coming up as being errors. I asked my mentor about it. He looked at my error messages and suggested the central JBoss repository was down. If that was true then the repository had been down for over a week. I asked my mentor how to know what to put in the pom and web.xml files since he had made so many changes in them. He suggested I get a book on Maven and look at the section on servelets in the Java EE 6 tutorial. So besides learning CDI and GWT I have to also learn Maven and Java EE 6. When I set up my Maven project I used the settings described in the Reference Guide for Errai. I didn't know I had to change them since it wasn't mentioned in the Reference Guide. I just assume the settings for Maven were universal for Errai. I bought "Apache Maven Dependency Management" by Jonathan Lalou and "Maven 3.1 Step by Step" by Riyaz Eksambi inexpensively on my kindle. Both books were from 2013. I wish I had been able to look through the books before I bought them. While they had information for Maven dependencies for applications like Spring there was nothing specific for Errai. The Java EE 6 tutorial didn't have anything specific to Errai servelets either. I also need to figure out what goes in the properties files. If I understood Errai better I would write my own book for people.

Since I need a job I have started to learn Python in more detail. I had been exposed to Django and Python 4 years ago but didn't know much of them. I have gotten calls about telecommuting jobs using Python and Ruby which I don't know either. Learning Python and MySQL  that went with it was much easier than learning Errai. I am having some problem with creating a project with Django. I am wondering if it has something to do with Windows 8 I am using. When I upgraded to Windows 8 I had to update MySQL because it wasn't configuring. I am hesitant to update to Windows 8.1 and the development applications for MySQL, Python, and Django because I might lose all compatibility.. A friend suggested I switch to a virtual Linux system. For Ubuntu there is no installer for Windows 8. Updating software creates a huge headache. Java and Maven are being updated all the time. I then have to change environmental variables, remove old versions, and remember to reboot to install them if I want access to the current versions. After the last Java update I suddenly didn't have enough heap space to run the JVM. I had to create a _JAVA_OPTIONS systems environmental variable of -Xmx512M to create enough space.

As you can see I have learned a lot of stuff but not enough to solve the rpc tracking issues. I wonder if I should give it up for now and concentrate on Python so I can get something up on Github in Python so I can find a job.

Wednesday, June 19, 2013

I have been continuing to work part time for Errai. Since April I have been trying numerous things to do Errai UI Navigation. I have been beating myself about how stupid I am not to get it to work. My code was full of red lines and xs in the Eclipse IDE. I tried Googling for help and was unsuccessful in finding something helpful. My mentor had stressed to thoroughly do my research before asking other developers a question because they would be more inclined to answer. Don't say just give me the code. You should provide code to show other developers you at least made an attempt at it. Finally in desperation I sent my mentor some code highlighting where the errors were. He replied that it looked like I didn't have the Errai UI dependency in the pom.xml:

<dependency>
  <groupId>org.jboss.errai</groupId>
  <artifactId>errai-javaee-all</artifactId>
  <version>${errai.version}</version>
</dependency>
 
Or if you prefer to manage your project's dependency in a finer-grained way, you can depend on errai-ui directly:

<dependency>
  <groupId>org.jboss.errai</groupId>
  <artifactId>errai-ui</artifactId>
  <version>${errai.version}</version>
</dependency>
 
These were not included in the reference guide. My mentor added it to the reference guide. I tried both dependencies and the finer-grained dependency solved the problem. My mentor had stressed to try to become independent. Some times one can attempt to be too independent and not ask for help. I should have asked my mentor much sooner for help. I was embarrassed I could not get even simple code to work. I would have saved myself a couple months of aggravation if I had asked sooner. My mentor is an expert on Errai since he was one of the founders. He quickly saw the problem in little time.

Tuesday, March 26, 2013

I am still learning GWT, CDI, Errai, and Errai Navigation. I also need to update my HTML skills to HTML5. One thing I worried about when I graduated was ending up in a routine job. Friends told me how much easier working was than school. The grad adviser seeing how tired I was from school suggested I get a job before I went on for a PhD. He said he had one student report back he was being paid not to do much of anything. I didn't want to sit around twiddling my thumbs.This internship has been so challenging that I didn't need to worry about any of that. This internship has been like being in grad school. There is always something new to learn.

Tuesday, March 19, 2013

I feel a little better. I'm not the only confused on how to use Errai. A customer just gave some constructive feedback about the Errai User Guide on Errai's irc.
I realized it has been 2 weeks since I have posted. Last Friday I got out of a rehab hospital for my fractured ankle. Fortunately, I had my computer with me so I could do some work. Now I have to work around home health care of nurses, doctors, physical and occupational therapists. I am in worse shape than before I fractured my ankle but I must press on. At the hospital they discover I was anemic, had a urinary tract infection, and was treated for my kidneys. The past year has been bad health wise but these problems will not stop me from working.

I tried writing a sample errai Navigational application based on the information on the website. Up until then I had used only simple errai CDI applications. Fiddling with code wasn't getting me anywhere so I decided to go back and read the reference guides on errat, GWT, and CDI. I realized I needed a better understanding of errai. GWT, and CDI before writing a Navigational app and modifying it.

Thursday, February 28, 2013

I realized it had been more than 2 weeks since I posted on my blog. Our originally project was to test the scalability of Errai. I first learned junit testing with an application my mentor wrote junit-4-prefrunner which I have discussed in earlier posts. My mentor had also built a testing application with an user interface.This application used time interval, message multiplier, and number of bytes to get the number of bytes that reached the server. He wanted the average, max, and min of the speed it took messages/bytes and bytes/message it took to reached the server. I modeled it using junit-4-prefrunner.

 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;

 import org.jboss.perfrunner.Axis;
 import org.jboss.perfrunner.PerfRunner;
 import org.jboss.perfrunner.Varying;
 import org.junit.Test;
 import org.junit.runner.RunWith;

@RunWith(PerfRunner.class)

public class PerfTest{
    double max = Double.MIN_VALUE;
    double min = Double.MAX_VALUE;
    @Test
    public void messageSentToServer(
            @Varying(name="messages", axis=axis.X,from=10,to=100,step = 10) int numberOfMessages,
            @Varying (name = "Load", axis=axis.SERIES, from = 1000, to = 10000, step= 1000)int bytesPerMessage)throws InterruptedException{
        String content = "0";   
        FileWriter fstream = new FileWriter("out.txt");  
        BufferedWriter out = new BufferedWriter(fstream);
        for(int num=0; num < numberOfMessages; num++){ 
  
        out.write(content);
        }
        out.close();
      
        }
   
    }

My mentor thought I was just learning more about junit-4-perfrunner. He also wanted a test harness with an user interface similar to his other application. He said he doesn't know how to do this. That it was just exploratory. It meant learning GWT and Errai-bus really well. After spending a lot of time on this we decided to switch projects. I am working on allowing any class that implements IsWidget to be annotated with @Page.We'd like to be able to more easily implement MVP using Errai-UI Navigation. Having a Presenter implement IsWidget annotated as @Page would allow us to do that. This will still mean learning GWT better but the project also uses CSS. It also uses Errai- UI Navigation that starting in version 2.1, Errai offered a system for creating applications that have multiple bookmarkable pages. This navigation system has the following features:
  • Declarative, statically-analyzable configuration of pages and links
    • Compile time referential safety (i.e. “no broken links”)
    • Generates a storyboard of the application’s navigation flow at compile time
  • Decentralized configuration
    • Create a new page by creating a new annotated class. No need to edit a second file.
    • Make navigational changes in the natural place in the code.
  • Integrates cleanly with Errai UI templates, but also works well with other view technologies.
  • Builds on Errai IoC & CDI

After making this decision to change projects my work was interrupted. Because my legs were still weak from rhabomeolysis I fell getting into my car and fractured a bone in my ankle. Because I can't take care of myself I am presently in a rehab hospital. I am having to spend late morning and early afternoon in therapy. I brought my computer to the hospital so I can still work late afternoons, evenings, and some times early in the morning. I am always interrupted by doctors, nurses, case managers, X-ray technicians, and people to take my vital signs. Hopefully I'll be able to work more on the weekend. I don't know how long I'll have to stay here.

Friday, February 8, 2013

I need one of the marketing interns to market junit-4-perfrunner so more people are using it. That way I would have more people working with it than me and my mentor and I could get some help writing test cases. My mentor has been gone this week so I have been on my own. Testing errai is a lot more difficult than what I have done already. I was discussing some of the problems I was having with devchix. Their immediate response was to use jmeter since they had not heard of junit-4-perfrunner. Thus brings up the problem of having a new superior product but nobody knows about it. It gets lost in github and the internet. My mentor released junit-4-perfrunner last year. jmeter has been around longer and has established itself. Once people have a product they think works they are less likely to change. If the marketing interns have any tips I would be happy to hear them.

Thursday, January 31, 2013

The past week has been frustrating. Since the last release of Errai the updates and changes have made it so Errai won't run. We can't figure out where the bugs are that prevent Errai from running and we have been trying all week to figure it out. With something as complex as Errai, it is difficult to find the bugs right away. We had to give up on our plans of performance testing of Errai for now.. The complexity of a lot of projects is what has kept me out of FOSS up until now. Women from Systers and devchix kept telling me I needed to build my portfolio in FOSS to help me get a job. A couple of women sent me links from github of projects they thought I would be interested in based on my background. It's difficult to dive into complex projects when you are a beginner and haven't been there from the beginning of a project. My mentor has been on the Errai project since the beginning and he can't figure out all the bugs preventing Errai from running yet. I established an account on github back then but had no idea what I was doing. I was able to learn the basics of github but it wasn't until this internship that I learned any more details of github with the help of my mentor Jonathan. Hopefully, the details of our internships on our blogs will encourage other beginners to  give it a try.

Friday, January 25, 2013

Most software developers at some point find themselves Googling for help. One of my pet peeves is when developers use the same tired example to educate. If other people are using the example you probably don't need to repeat it. Come up with your own example! We are searching because we didn't find the tired example too helpful. My other pet peeve is when developers only give a few lines of code without giving a complete example demonstrating the concept in question. I ran into these problems when trying to look up ExecutorService which is finally why I had to get help from my mentor. That is why I made sure our example made it to my blog. I imagine if I kept searching through all the links I could have found something helpful but that takes time. Part of the reason for the FOSS movement is to help other developers. When you solve a particularly hard problem be sure to post it so others can learn.

Wednesday, January 23, 2013


If we make the data big enough, we would expect a big increase in the amount of time taken as we add more threads, unless you have an SSD (solid-state disk). The more files you try to write simultaneously on a regular mechanical disk, the slower the total throughput will be. This is because the disk is forced to spend more time seeking to a new track, and less time writing to the track it's already on.

So here's what I did next: I added a new variable into the mix. I added a second @Varying parameter (axis=series) for the amount of data that should be written. I tried ranging from 10MB to 100MB in increments of 10MB to what happens hoping maybe a clear trend will emerge.

import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.jboss.perfrunner.Axis;
import org.jboss.perfrunner.PerfRunner;
import org.jboss.perfrunner.Varying;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(PerfRunner.class)     
public class SampleTest {
    @Test
    public void numTest (
    @Varying(name = "MB", axis=Axis.X, from = 1, to = 10000000,step = 250000)int numMax)throws Exception{
        String content = "0";   
        FileWriter fstream = new FileWriter("out.txt");  
        BufferedWriter out = new BufferedWriter(fstream);
        for(int num=0; num < numMax; num++){ 
        out.write(content);
        }
        out.close();
    }
     @Test
     public void perThread (
     @Varying(axis=Axis.SERIES, name = "Megabyte",from = 10000000, to = 100000000, step= 10000000) final int megabyte,
    @Varying(name = "thread", axis = Axis.X, from = 1, to = 10, step = 1) final int threadCount) throws InterruptedException {
     // First define the task that needs to be done.
    
     Runnable task = new Runnable() {
     @Override
     public void run() {
  try{
      // create temporary file with extension suffix
         File file1 = null;
     file1 = File.createTempFile("PerThreadTest", ".javatemp");
     BufferedWriter out = new BufferedWriter(new FileWriter(file1));
     for (int i = 1; i < megabyte; i++) {
        out.write('a');
       }
        out.close() ;
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
     }
     };
     // Now define the executor service that will execute the above task
     ExecutorService exec = Executors.newFixedThreadPool(threadCount);
     // Submit the task 10 times
     for (int i = 0; i < 10; i++) {
     exec.submit(task);
     }
     // Finally, wait for all the submitted tasks to complete (1 hour should be way more than enough!)
     exec.awaitTermination(1, TimeUnit.SECONDS);
     // Free the threads that were created by Executors.newFixedThreadPool(threadCount) above
     exec.shutdown();
     }
}

   I ran the test 4 more times at this weight and different weights. The results were random for outliers for different weights at a different number of threads. We think what we're seeing in the data is the expected trend: the more different files we write simultaneously, the longer it takes to write the same amount of data. There's an occasional dominating effect where one of the files takes a really long time to write (like 10x longer). We think what we're seeing is the operating system deciding (based on whatever rules it uses) to flush out the disk cache so one writer gets held back while the OS processes data from all sorts of places, including my other writers as well as other unrelated processes  but the underlying signal is there, for sure.
As promised here is the code for 10 MB varied over the number of threads. I had trouble coming up with it and needed some help. The examples for concurrency in the oracle tutorial were for sockets which didn't have much relationship to what I was doing.Many other tutorials used the same examples. Mine was varied over 1 to 10 threads by a step of 1 because it is difficult to vary by 1, 2, 5, and 10 without the other steps in between. The first test in the code is just the first one done previously.

 import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.jboss.perfrunner.Axis;
import org.jboss.perfrunner.PerfRunner;
import org.jboss.perfrunner.Varying;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(PerfRunner.class)      
public class SampleTest {
     @Test 
    public void numTest (
    @Varying(name = "MB", axis=Axis.X, from = 1, to = 10000000,step = 250000)int numMax)throws Exception{
         String content = "0";    
        FileWriter fstream = new FileWriter("out.txt");   
        BufferedWriter out = new BufferedWriter(fstream);
        for(int num=0; num < numMax; num++){  
         out.write(content);
        }
        out.close();
    }
     @Test
     public void perThread
 @Varying(name = "thread", axis = Axis.X, from = 1, to = 10, step = 1) final int threadCount) throws InterruptedException {
      // First define the task that needs to be done.
     // This task writes a million 'a' characters to a file:
     Runnable task = new Runnable() {
     @Override
     public void run() {
  try{
          // create temporary file with extension suffix
         File file1 = null;
     file1 = File.createTempFile("PerThreadTest", ".javatemp");
     BufferedWriter out = new BufferedWriter(new FileWriter(file1));
     int megabyte = 1000000;
     for (int i = 1; i < megabyte; i++) {
        out.write('a');
           }
        out.close() ;
        } catch (IOException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
       }
     };
       // Now define the executor service that will execute the above task
     ExecutorService exec = Executors.newFixedThreadPool(threadCount);
     // Submit the task 10 times (total data written will be 10MB)
     for (int i = 0; i < 10; i++) {
     exec.submit(task);
     }
     // Finally, wait for all the submitted tasks to complete (1 hour should be way more than enough!)
     exec.awaitTermination(1, TimeUnit.SECONDS);
     // Free the threads that were created by Executors.newFixedThreadPool(threadCount) above
     exec.shutdown();
     }
}







Friday, January 18, 2013

It turns out there wasn't really a threshold where suddenly the signal broke out above the noise. My first test was fine grain low numbers. When I used 1 MB, 10 MB, 100 MB, and 1000 MB the results with a little noise were more or less linear.

My next task is to make a second test method and try writing a fixed amount of data (say, 10MB) with a varying number of concurrent threads. In the first trial, 1 thread writes 10MB; second trial, 2 threads write 5MB each, … 10 threads write 1MB (to separate files). My second method can call the first one so there is no need to duplicate that logic! I will need to come up with a strategy for giving the file a unique name each time I call the method.. see File.createTempFile()               http://www.java-examples.com/create-temporary-file. Last summer in my embedded systems research class I had been introduced to multithreading programming but it was in C++ and C#.
 Jonathan recommended The Java Tutorial http://docs.oracle.com/javase/tutorial/essential/concurrency/index.html. Since I had the C++ and C# multithreading background Jonathan thought I could skip to the "immutable objects" section and recommended I read that part and the following (High Level Concurrency) carefully. He thinks I will probably want to choose ExecutorService for my test. but to take the time to work through the whole guide. I found it to be more complicated than Win32 and OpenMP used in C++ and C#. Jonathan recommended not to dwell too much on synchronized, Thread.*, or Object.wait()/Object.notify(). He claimed the newer APIs (ExecutorService, Callable<T>, etc.) are more straightforward.

I read the link on File.createTempFile() and it seems to be understandable. It was the concurrency tutorial I had more trouble with. Oracle tutorials can be hard to follow because they assume too much and you have to jump around links to understand the material. Besides that multithreading programming is considered one of the more difficult things to do in computer science. I haven't used multithreading in over a half of year so I need a refresher course. I remember the basic concepts it's just the details I don't remember.Since I was having trouble I started reading other people's tutorials and blogs on multithreading and ExecutorService. Some of it is beginning to make sense but I haven't been unconfused enough to ask Jonathan intelligent questions. I have to wait until the fog in my head while reading clears before I can ask questions. That sometimes takes some time but I do get there. At 3 PM I was having a bad case of the Imposter Syndrome. I called my mother, the retired university professor, to talk about it. She can relate to it but says she was too stubborn to give up. Back in the 50s and 60s my mom was the only woman in her Russian and German classes especially in graduate school. I have lost a lot of confidence since having a PhD adviser calling me stupid. It hurt my test taking and studying long after I left his lab. I have a friend, Dr. John Reed, who is a retired UTA councilor and  has been trying to help me with study techniques. He recommends study 50 minutes and then take a 10 minute break. Do that 3 times and then go off somewhere for two hours doing something else. Then come back and do the 50 minutes/10 minutes thing again. He told me not to study more than 8 hours a day. He claims the brain needs time to process the information. He knows I stare at the book and computer screen too long in desperation and gives me hell about it. I told him I feel guilty if I am not studying. John's methods don't jive too well with most employers who expect people to work a straight 8 hour day or more.. Jonathan hasn't complained to me and has been very supportive.

When I figure this all out I will be sure to post it so I can educate other poor souls.

Wednesday, January 16, 2013

By Tuesday afternoon I was still doing performance testing wrong. I had been looking at queueSize in PooledExecutorService in org.jboss.errai.bus.server.async.scheduling. I thought I would vary that to determine how many users can use the ErraiBus.  This is the code I was trying to test.

package org.company.firestorm.client.local;

import org.jboss.perfrunner.Axis;
import org.jboss.perfrunner.PerfRunner;
import org.jboss.perfrunner.Varying;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(PerfRunner.class)


public class PooledExecutorServiceTest {
     @Test
      public void testPooledExecutorService (
          @Varying(axis=Axis.X, name="Queue Size", from=0, to=100, step=10) int queueSize
          ) throws InterruptedException {
           Thread.sleep(queueSize);
       }
}
This was totally wrong. For one thing I was trying to white box test the internals of Errai instead of black box testing. Jonathan suggested I try performance test writing 0s into a file for 1 MB, 10 MB, 100 MB, and 1000 MB. It was pass 5 PM my time so I thought I would stop for the day and get something to eat. I fell asleep relatively early so I found myself up at 2 AM. I decided to do some work. I have gotten into the habit of now and then of working in the middle of the night this way. When I was in school it was common for the professors to be up at night and come in late to teach the next day. I found myself more than a few times exchanging emails with the grad adviser at 2 AM. Now that I am out of school I can work in the middle of the night without being interrupted by nurses, home health aids, and phone calls. The problem with this is Jonathan is on the irc 8 AM - 5:30 PM my time when I can ask him questions. I find myself some times having a hard time staying awake during this time because I was up early. I write emails to Jonathan of what I had been doing and answers he them when he gets in the next morning. I do chat with Jonathan on the irc during the day.

This morning I seemed to be doing something right. This is the code  I was first testing early this morning:

package org.company.firestorm.client.local;
import java.io.*;
import org.jboss.perfrunner.*;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(PerfRunner.class)
public class sampleTest {
    @Test
    public void numTest (
    @Varying(name = "MB", axis=Axis.X, from = 1, to = 1000, step = 10) int numMax) throws Exception{
        String content = "0";
        FileWriter fstream = new FileWriter("out.txt");
        BufferedWriter out = new BufferedWriter(fstream);
        for(int num=0; num < numMax; num++ ){

        out.write(content);
        }
        out.close();
        
   }
}
<perfrunner-org.company.firestorm.client.local.sampleTest.html><out.txt>
 
 
 
This was the result I got. I didn't get the linear up to the right line that I expected. The text file "out" did have all the 0s expected.
 
Let's draw some parallels to what we plan to eventually do with Errai performance testing:

1. I am black-box testing BufferedWriter. I didn't have to examine the inner workings of BufferedWriter in order to create this test. I just used its public API.
2. The results surprised me! This is the hallmark of a useful performance test, because it means you're about to learn something new. :-)
3. The independent variable (numMax) in this test was not used to tune the BufferedWriter I was testing. Instead, it was used to decide how much exercise to give to the BufferedWriter.
 
I then used 1 MB, 10 MB, 100 MB, and 1000 MB for the "to =  " part of the code and changed the step so the trials were tested 4 times (i.e. 0.25 MB, 2.5 MB...). This time I got more linear code that went up to the right. The "out.txt" had millions more 0s. It appears when I was measuring smaller numbers with smaller steps I was just measuring noise. The signal had not gotten over the S/N threshold. Now I must devise a performance test that would help me find the breaking point where the cost of writing to the file is detectable. I think I am going to eat and take a nap first.

Monday, January 14, 2013

It has been a frustrating first week and I wonder if I am in over my head. I chose a coding project because I want to be a software developer. I picked JBoss because it was written in java. I know java better than python or ruby like other organizations were using. I knew the projects wouldn't be easy. I wanted to be using a language I could get up to speed the fastest. I chose Errai because it was second on the list and I knew what a plugin was. The first on the list I had no idea what it was about. Other projects worked on testing which I knew nothing about. It turns out my first task with Errai is performance and scalability testing. It is good that I am learning about testing. The few job interviews I have been on they asked me how I would debug my code without a debugger. Being naive all I could say was put print statements in. UT Arlington had a testing class in the software engineering program but I was in the computer science program just learning algorithms, math, and statistics for software. I mentioned in my masters exit interview perhaps they should have computer science majors take a testing class.

My mentor, Jonathan Fuerth, was on vacation until January 7 so at first I was on my own. Jonathan had written some software, junit-4-perfrunner, so the results for junit performance testing would be graphed for easier interpretation. At first I thought I had a vague understanding of the way of using it but I was totally wrong. I thought I was to set up test cases method by method. The problem with that it makes the test cases and code hard to maintain since there are so many methods. Jonathan has tried to explain junit testing to me. I think I understand how to do it for accuracy but performance testing eludes me. I understand at a higher level but I don't know how to write the test cases. Jonathan assigned me to understand junit testing, junit-4-perfrunner, and Errai Bus which communicates between the client and the server before attempting to write the test harness. He suggested I play around with the code. I looked at the source code for Errai Bus and there close to a 100 files I would guess. With each file playing a different role I thought we were suppose to unit test file by file. That turned out to be wrong for the same reason method by method  is wrong. We want to simulate real world scenarios, so we should focus on choosing one of those, then figure out which parts of the framework we need to build a performance testing harness for. We want to be able to answer questions like:
    "how many concurrent users can Errai support on a single server?"
    "what if my network goes out for 2 minutes, so everybody [10, 100, or 1000 users] gets       
     reconnected at the same time?"
    "how does the performance of errai 3.0 differ from errai 2.2?"
    and so on.
We want to anticipate performance questions people are likely to ask us, and come up with the answers now. Jonathan says writing the test cases is the fun/hard part. I am waiting to catch a clue so the fun can begin.

Thursday, January 3, 2013

January 2 was suppose to be the first day of the internship. After a long arduous journey across my bedroom to my computer I discovered after waiting on the IRC and sending am email that my mentor was still on vacation. He'll be on vacation until January 7 so I am on my own until Monday. It was a long walk but I didn't break a sweat. I'm being facetious. I can walk well enough that it isn't any strain to walk around the apartment. I just have problems going long distances. I asked my mentor which version of the JUnit test runner to use on baseline scalability tests on Errai which is suppose to be my first task. He answered my email to give me an answer and to tell me he was on vacation.  He had referred to a "new test runner" in the Errai bug tracker list which turned out be something he wrote: junit-4-perfrunner. The strain of the day drained me (once again being facetious) that I decided to take a nap before getting started. I can be a real slave driver when it comes to taking breaks.

Tuesday, January 1, 2013

I may have given the impression in the previous post I am only in computer science because of jobs and money. That is not the case. If I just wanted a job I could have stayed in teaching without a lot of additional training. I would only have to gone through summer alternative teacher training. Getting a MS in computer science took a little bit of investment in time and money. If I didn't enjoy computer science I never would have gone into it. What also led me into computer science was I enjoyed the problem solving when teaching math.