Showing posts with label Ramblings. Show all posts
Showing posts with label Ramblings. Show all posts

Saturday, January 23, 2010

Virtual Boot?

I set up my Laptop to dual boot 32 bit Windows and 64bit Windows. I find I'm spending more time in the 64bit version where everything just seems to run smoother. But I have software installed on the 32bit partition that I don't have on the 64bit partition which I either don't want to install there or it won't work in a 64bit environment (KQ7 anyone?).

Dual booting has been working okay, but it is becoming a pain to switch between partitions when all I want to do is use one piece of software installed there. Especially when all of my settings and bookmarks are on the 64bit partition. I'm starting to wish there was something like Boot Camp for Windows so I could just run the 64bit system and then virtual boot the 32bit when I want to use that software. A Dosbox VPC hybrid interface might even work.

Sure I could set up a virtual machine, but I already have everything set up and working right on the other partition. Sure I could possibly convert the other partition into a vhd but that would just be over duplicating what is already there.

Maybe if someone working on Windows 8 could get the same idea here and throw in iso support too…

Tuesday, September 8, 2009

Popups

Dear Netflix, University of Phoenix, and others who blatantly continue to use the blight of popup advertizing,

I wanted to let you know that I will personally continue to abstain from use of your services so long as you continue to use popup advertizing.

Thank you.

~____

Saturday, August 29, 2009

Precision

I used to argue with my dad on the matter of precision. My dad is and engineer in education and personality as was his dad and his dad's dad and so on, so I inherited the mentality critical thinking and interest in mechanics, processes and technology of an that such a personality brings (Which sadly doesn't help with personal relationships:).

At one point I had decided I wanted to design my own game engine. I had decided I wanted to use the most precise decimal system I could find in 'cough' VB for storing the locations of points. In the process of designing the basics of the engine I tried to find pi to the most decimals that would fit in the desired unit. I had learned the 22/7 trick from my Drafting instructor but was completely unsatisfied with the accuracy of only 2 decimal points.

My dad asked why I thought I needed any precision beyond two decimal points; in the mechanical engineering world two or three decimals are usually considered accurate enough for almost any consumer products, as anything more precise makes little difference, and just the expansion and contraction of materials alone exceeds the difference such precision would bring. 

But I was using a computer and despite what the 1950s and the movie industry hope to tell you, computers are inherently inaccurate at least when it comes to trying to calculate decimal and floating point numbers.

If you use floats for storing points in a world you can move around in, you would find that the precision of the locations of points in the center of the world is quite high, but the farther away you move from the center the less precision you have because the whole number portion of the value is getting filled with the larger numbers sacrificing the precision and storage space of the decimal portion. So at the edge of a large map you could end up with unexpected gaps in your world.

Well, okay if you were to only use integers the gaps could be reduced, but when you want to try to copy the nature of your surroundings you might find you want more precision. The thought might come up to use fixed point, sure it could work but you would have to be very careful with your rounding and your geometry.  You also end up with geometry that can look a little blocky depending on the resolution of your values.

But I never got far enough along to be able to see any degradation. So now days, I've stopped caring. Well almost, when I go back and play with old geometry code I am still tempted to write everything as doubles rather than singles, but now I've learned to think processor capacity and the effects on speed too.

Thursday, March 20, 2008

Software Complications

I think I finally understand some of the strange things which complicate the creation of software.

I was involved in testing a small piece of internal software written by one person then handed over to a small group to finish. It mostly worked when he handed it over but was missing some stabilization and fit and finish. Being handed over it fell into a strange mix of complications.

Number of coders When there is one coder, there is one opinion and one style. The program should theoretically be consistent. Adding other coders throws a wrench in the works. Each coder has a different style and a different background. Not to mention they aren't familiar with the other coder's code.

Language complexity The complexity of the language can make things more difficult by hiding useful elements of the language in places some programmers wouldn't think to find or wouldn't know it even existed causing programmers to wrap their own solutions to things which already exist.

Language stability The stability of the language helps quite a bit. If a language is a type-safe language with garbage collection it is more difficult to have more disastrous consequences. Where in a language like C++, if you are not careful the program can leak and corrupt memory.

Project Complexity It is impossible to write a program which does not have errors. There will always be bugs in any program. Even a simple program will have some kind of way it can fail. The more code a program has and the more pieces it accumulates the more bugs it is likely to have. So the number of possible bugs is somewhat proportional to the complexity of the program.

Coder's Programing skill No two programmers have the same skill set or experience. Some have years of college and work experience, while others are new but well taught. Others are self taught, gleaning on the histories of others. As such the ways code is written will vary deeply depending on who codes.

Coder's Language familiarity The familiarity a coder has with a language certainly helps with how well they can code. A lot of languages have a very similar structure so someone familiar with a similar language can generally be somewhat efficient in another. But there are things such as libraries and learning the gotchas of a language which differ. For instance Someone who was educated in C++ can program in C# but they are likely to make things more difficult than necessary. And Someone who was trained in C# is likely to need to heavily use references to get much dome.

All of these things and others can make things difficult. A Programmer who is handed a project but is not familiar with how a program works is likely to unknowingly break parts which work perfectly well, while trying to fix some other part.

It was amazing to see how all of these factors can play into how a program eventually ends up. And the quality of it.

Thursday, January 24, 2008

Spreadsheets

I got my spreadsheet start in Quatro pro. Now days I now use Excel quite allot. It was an easy transition.

What is cool about spreadsheet programs like these, is what you can do with them.

Most people use them to create stuff for finances like budgets, schedules, Payrolls etc. Excel is really good at those sorts of things. After all that is what it was designed for.

But it's the other things it can be used for that I find interesting. For instance I created a spreadsheet which every morning at Work I enter the time I arrived and then at the end of the day I enter the time I left so that I can calculate my hours every week.

When I first started at my current job I created a spreadsheet to keep track of where things are and what and when to do it. Basically I used it as brain storage. Pretty soon it became a piece of a model for organization for the team. It's strange.

When I was at school I had finished several programs and wanted to see how close I was to achieving any certificates or degrees. So I took the Syllabus and duplicated it in Excel then plugged in some formulas so I could set some check marks which would then highlight certain cells if the achievement was accomplished.

While at it I discovered that the Syllabus hadn't been calculated correctly. So I asked my Instructor about it and when he looked at it he asked if I could finish it so he could use it. He also said it was worth extra credit. So I finished it, and in the process helped fix the credit distribution.

Believe it or not Excel is also pretty good at geometry too. Using the right kind of chart it is simple to create graphs, but by indicating x and y the graph can go back on it's self. Then by doing this it is relatively simple to create a graph of a circle or square or whatever.

Back when I was small and One of my Uncles was going to school to be a Math Teacher he showed me this really cool Quatro pro graph he had done. It produced a Spirograph where you could change certain cells and get really neat designs.

Whenever I have something I want to formulate like how to write a program which draws an ellipse I'm likely to draft it out in Excel.

The more I use spreadsheets the more I think of the possibilities of what they can be used for.

I bet one day someone will figure out how to write a game of Asteroids all using Excel cell formulas. It would be difficult for sure. But it would sure be cool. even though it would be equal to using a screwdriver or a wrench as a hammer.

Friday, January 18, 2008

CRT RF Ghosting

I'm sitting here watching TV and finding it a little weird that I'm seeing a few second delay precursory ghosting in the screen.

It seems to be the DVR sitting on top of it, for some reason, as it records the analog signal of the live broadcast, produces RF interference which, with the 2 second + delay on the signal out, overlaps the interference as the ghosting effect of what will soon occur.

It's kinda interesting. And even stranger when there is an hour or so delay.

It reminds me of a computer we once had, which if it was turned on within 5 feet of a powered on CRT monitor or TV, would ghost whatever the Video card was displaying.

It was entertaining to watch the cursor moving Solitaire cards on Windows 3.1 superimposed over the news.

Fun days.

Sunday, January 13, 2008

Reverse

While helping my office mate prepare for his Interviews a whole bunch of us were coming up with questions and challenges for him. We were really hoping he would make it. One of the challenges asked was to reverse a string.

Having been asked to do it in an interview before (I did it in VB then) I had, had the time to come up with other possible solutions to the challenge. Here is a C# version of the method from memory:

/// <summary>
/// Reverses a sequence of chars in a string.
/// </summary>
/// <param name="value">String to Reverse</param>
/// <returns>the reverse of the provided string.</returns>
/// <remarks>
/// Reverse by back stepping through each char in the string 
/// and filling a StringBuilder with the result.
/// </remarks>
public string reverseStringFill(string value)
{
    StringBuilder temp = new StringBuilder();
    // Iterate backwards through each char and copy 
    // it's equivalent from the source string.
    for (int index = value.Length - 1; index >= 0; index--)
     {
         temp.Append(value[index]);

     }
     return temp.ToString();

}

Here is another variation:

/// <summary>
/// Reverses a sequence of chars in a string.
/// </summary>
/// <param name="value">String to Reverse</param>
/// <returns>the reverse of the provided string.</returns>
/// <remarks>
/// Reverse by back stepping through each char in the string 
/// and filling the resulting array.
/// </remarks>
public string reverseStringBFill(string value)
{
    char[] temp = value.ToCharArray();
    int length = value.Length - 1;
    // Iterate backwards through each char and copy 
    // it's equivalent from the source string.
    for (int index = length; index >= 0; index--)
    {
        temp[index] = value[length - index];
                
    }
    return new string(temp);

}

My Office mate having learned in C/C++ most of school came up with a swap method that he had learned in class, but when he tried to run it in C# it had compile errors. because he was trying to do things the C way in a type safe language. After a hint about casting he figured it out. What he ended up with is something similar to the following:

/// <summary>
/// Reverse String using Swap
/// </summary>
/// <param name="value">String to Reverse</param>
/// <returns>the reverse of the provided string.</returns>
/// <remarks>
/// This is how a C/C++ programmer would reverse a string in C#
/// </remarks>
public string reverseStringSwap(string value)
{
    char[] returns = value.ToCharArray();
    int index = 0;
    while (index < value .Length / 2)
    {
        // Swap chars
        char temp = returns[index];
        returns[index] = returns[(value.Length-1) - index];
        returns[(value.Length-1) - index] = temp;
        index++;

     }
     return new string(returns);

}

While he worked at the problem I was thinking of a similar way to do the same thing from a managed perspective:

/// <summary>
/// Reverses a sequence of chars in a string.
/// </summary>
/// <param name="value"></param>
/// <returns>the reverse of the provided string.</returns>
/// <remarks>
/// This is similar to the swap method except it
/// only pulls it's chars from the source string.
/// </remarks>
public string reverseStringBSwap(string value)
{
   char[] temp = value.ToCharArray();
   int length = value.Length - 1;
   int half = length / 2;

   for (int index = 0; index < length; index++)
   {
      temp[index] = value[length - index];
      temp[length - index] = value[index];
                
    }
    return new string(temp);

}

He had written his in a console app and I in a GUI app so rather than  return new string(returns); His actually used Console.Write(returns); I stumbled around for a little while trying to remember how to cast to a string. But eventually found it, hopefully I can remember it now. I have changed the methods so they work the same in a GUI and a Console app as I like a clean Modular design.

While at it I found Array.Reverse(""); and this nice little, simple, clean and tidy, method ensued:

/// <summary>
/// Reverses a sequence of chars in a string.
/// </summary>
/// <param name="value"></param>
/// <returns>the reverse of the provided string.</returns>
/// <remarks>
/// This is the simple way to reverse a string.
/// Simply by using the power of the Framework.
/// </remarks>
public string reverseStringArray(string value)
{
   // Copy to an array
   char[] temp = value.ToCharArray();
   // Reverse
   Array.Reverse(temp);
   // Return casting the array as a string
   return new string(temp);

}

Now for the real fun. Recursion (Where a method calls it's self over and over until it finishes it's work, then backs out to provide the results.). This method ends up being fairly simple, but it is slower, has potential to crash and is somewhat difficult to wrap one's head around. But it looks clean and impressive.

/// <summary>
/// Recursive String Reverse
/// </summary>
/// <param name="value">String to Reverse</param>
/// <returns>the reverse of the provided string.</returns>
/// <remarks>
/// This method Reverses a string by calling it's self recusively 
/// The method used here is certainly not the fastest method avalible
/// as it uses slow string concatenation and has the possibility of
/// having a buffer overflow recursing to many levels if using a 
/// string which is to long. But the idea is just so fun.
/// </remarks>
public string reverseStringRecursive(string value)
{
    if (value != "")
    {
        // Recurse the incoming string, minus the first char, then return 
        // the resulting string, appending the first char to the end.
        return reverseStringRecursive(value.Remove(0,1)) + value[0];

    }
    else
    {
        return "";

    }

} 

Ah, this was fun! One of these days I should revisit one of my old favorite sites (http://www.xbeat.net/vbspeed/) and try to work out a method for timing the methods and try a few other speedy ideas.

One of the odd things from that site is that you learn that simplicity is not always equal to speed. Rather often the reverse is true. There are some strangely long code snippets setup just for improvement with speed.

Monday, January 7, 2008

Résumé updating

I have less than three months left in my contract, so I'm back looking over my Résumé again, trying to figure out how to add my current position to it, which apparently I had added in June and since forgotten about the contract mix up which required an update. Well, I have updates to add to it anyway, as I have been doing some SDET work lately. Ah, having fun breaking software, he he.

While helping cleaning on Saturday I stumbled across a packet which included a handful of Resumes. I glanced over them and thought about what would cause a potential employer to balk, while trying to read them. I was balking anyway, they were a little brash, slightly pompous and blindingly difficult to read. All written using one of the the standard Word Resume templates. On one the goals mentioned had nothing to do with the position.

If I were the hirer I don't know how long I could stand looking over those resumes unless all of them were similar. So I think I know some things I should remember as I work on mine. But it is hard to detach myself from what I have written, to look at it through someone else's eyes.

One reason for the update is that there are a couple of FTE positions open on my team which I could possibly apply for.

I'm not going to get all excited, thinking I will actually get a position, but if I do interview, it would at least be good practice as I continue to learn and grow in this career path.

Sunday, January 6, 2008

I _ Software

A silly thought came to me the other day of the perfect bumper sticker if I were to ever get one. So I went searching around and finally found a website which allows you to design your own bumper stickers http://www.makestickers.com/customize.aspx?TID=5870 And this is what I ended up with:

But if I was ever to find a way to get in on the Dev side I would have to switch to this one:

I think the first one is funnier.

Wednesday, December 19, 2007

IE Passes Acid2

Woo, hoo. A couple of months ago I was waking through the halls of IE, so I could catch my carpool home, and glanced something exciting on the wall.

What I saw has finally been announced. It should have been introduced something like: 

I hope all you developers out there there now have smiles on your faces.

Why? Because IE8 finally passes the Acid2 test!

http://blogs.msdn.com/ie/archive/2007/12/19/internet-explorer-8-and-acid2-a-milestone.aspx

The first section of the video on Channel9 is cool.

The team has put in a lot of work over the past year, they still have work ahead. But it is exciting. At least for someone who does occasional web development.

When IE had a public bug tracking system setup for IE7 there was a bug which simply stated. "Pass Acid2 test". Well I suppose that bug can be closed now. :)

Wednesday, October 10, 2007

Krondor mmm.

Ah. DosBox. I decided to reminisce I downloaded DosBox and opened one of the games I have fond memories of. Betrayal at Krondor. Good memories of a classic game.

Now if I can just figure out how to give it write access to specific files so that I can get past the introduction. Nice! Got it. Just had to share the folder so that the program has permissions.

Good thing DosBox works with Visa. I wonder what else I can get working on it?

Sigh. Weird. For some reason I have been longing, yearning to use Windows 3.1 again. The nostalgia. Yeah. Really Weird. I wonder if I can put it in a Virtual PC? Hmm. Could be cool. Another day though. Krondor Tonight.

Sunday, October 7, 2007

Aw. No Analytics report

Aw. It looks like I didn't install the Analytics tracking script correctly, or something. I happen to know there were at least two hits over the past week.

I had thought that maybe those that read, might be doing so via. RSS Feed. It is quite possible but then I went looking for the tracking script I had placed and, it was gone. Whoops. This time I placed it in a place where I know it should go.

But then if Javascript is turned off in a browser it won't be tracked. Actualy, I wonder what this page looks like without JavaScript. Google relies on it heavily.

Monday, October 1, 2007

Socks and Sandals

Sad. My Manager is moving to a new position soon. He is an awesome Manager. I suppose it is good that he is moving on at the highpoint of this position. That's the way to do things.

He is one of the classic Pacific Northwestern Socks and Sandals guys (http://www.werealotlikeyou.com/) See #56. And the Youtube to go with it (http://www.youtube.com/watch?v=Z59fQ12OR0A).

Ah. Maybe I didn't have to give up Sandals and socks when I moved up here after all.

I finaly fixed the you tube link

Monday, June 11, 2007

Work Schoolin

I signed up for a class through Volt and actually got in. It's only $10 and I start on the 12th. I hope I can get something out of it. It is only two nights for two hours a night but it should be interesting.

It is a javascript class. I have studied some javascript before but I would get partway through a book and get board of it. It is hard to keep going through such a book on my own motivation. I managed to get through my even more dull drafting books by doing all of the reading studying and projects in class, where I could almost totally focus on just that book.

There is another class coming up that I am thinking of signing up for but I'm not sure I'll get into it. It is on a more popular subject so it could be a craps shot to get in.

Tuesday, May 8, 2007

Junkware

After a little searching around, I finally found a decent replacement for QuickTime. It’s called QuickTime Alternative. If set up right, it allows you to play QuickTime files such as Mov files in Media Player.

QuickTime has been one of those pains in the side pieces of software from the first time I ever installed it. The first time I needed it, it came as part of a game, and it overwrote the newer version of QuickTime that was already installed, thus corrupting it. Since then I have tried to avoid installing and using it. And pretty much every time I have had to use it since, I have found the player even slower, with more features I don't want to use. With the addition of ITunes messing up the registry and my files it has become even more of a nuisance. I don't buy music; I hardly even listen to music. I don't need ITunes.

The next most annoying media player is Real Audio Player. With its ads and spamtacular registration Its hardly worth installing

For it there is also a codec Real Alternative for Real Audio Player, but it doesn’t work with steaming audio, which is what you would want Real audio for in the first place. So it doesn’t seem to be worth it yet.

This time I’ve decided to keep my computer as clean of junk software as I can.

Other popular junk software I’m trying to avoid? Well, Let’s see: WinZip, QuickTime, ITunes, RealAudio, WinRar. Oh yeah and Symantec’s antivirus. I have had enough headaches because of it, I don’t want it.