Sunday, June 28, 2009

New Math Reading material

Currently, I am reading the following: Euclid in the Rainforest: Discovering Universal Truth in Logic and Math byJoseph Mazur, Infinity: The Quest to Think the Unthinkable by Brian Clegg , and The Planets, by Dava Sobel. I wonder if it is best to read several books at once, or read them in a more linear fashion. I think my attention deficit issues make for a better time by reading them when I find the urge hits me. So far, Mazur and Clegg are the more interesting read. I have always had a fascination with infinity. Hence the Aleph character on my blog.

At work: I have been approached by my company's customer to come to work for them. More to come as this unfolds. I was told to keep it quiet until the deal is near fruition, but I can't help but feel that I am somehow cheating on my company. Weird feeling. You have to do what's in your best interest no matter what.

Tuesday, June 23, 2009

Big list of free software

I came across this big list of free software for home use. The "SpeedCrunch" calculator has been useful. I haven't tried out all the stuff, but it looks promising.

Sunday, June 21, 2009

Lazy Sunday - Not like the Chris and Adam vid

Father's day was fun this year, as it is every year on the planet for me. My wife and kids took me to the river to soak up the rays and splash in the cool cool water. We may be getting a camper in the next year or so to take advantage of this beautiful planet. After we take care of some home maintenance issues here and there. The AC unit just isn't cuttting it in the Florida summers anymore. Anyway, a special thanks to my family for putting up with me for another year. Thanks and love from Dad!

Friday, June 19, 2009

Simple C# String character remover.

I search for a .Net method to remove a character, such as a space, from anywhere in a string. I found the String.Trim, String.Left, and String.Right, but I didn't see anything that removes a character from anywhere in the middle. Maybe my eyes are just not seeing it. Anyway I rolled my own as follows:


public string RemoveCharFromString(string str, char c)
{
if (String.IsNullOrEmpty(str)) return null;

StringBuilder sb = new StringBuilder();

foreach (char i in str)
{
if ( i != c) sb.Append( i );
}

return sb.ToString();
}

Simple enough. I bet there are better ways, but is it worth the time to search for
the perfect implementation? I guess it depends on the application requirements. You check for null or empty string before entering the loop and just return a null, and i suppose the whole thing could be encapsulated in a try-catch block for extra, extra precaution. No reason for that comes to mind, though. :-)

Busy Friday

Did not have time to even take a lunch break today. Discovered the Bragster.com and the I-AmBored.com sites about the same day this past week. Until recently, I have stayed away from mass blogging sites for lack of time and I guess I just have not been putting in the social effort into the internet. That's my excuse anyway.

Fun sites.

I visit Digg and Reddit sites fairly frequently, though. So I am not totally last week's news.

Speaking of news, I heard a couple of MTv generation radio DJs commenting on the coming North Korean's launch of a missile at Hawaii on the 4th of July. One dude and dudette talking current political situation of relations with respect to the US and NK. Dude says that "we shouldn't worry to much about the missile because its range is 500 miles short of the islands." Dudette pipes up and says "yeah, but they could launch a missile from one of their aircraft carriers." I almost drove into the car in front of me. So many things wrong with that statement to mention. Most people are so ignorant of the world that it just makes U sad. These people are our future. Hopefully she is a looker! ;-)

Wednesday, June 17, 2009

HexWorkShop & Math @ Answers.com

I have been using our licensed copy of HexWorkShop to get down to the nitty gritty bitties at work for some time now. I love the UI look and feel and it has proved to be a very useful tool for looking at the bits of a file(s). You can flip data bits, evaluate highlighted data, poke data into locations at will, and best of all, search for byte/word patterns. If there is a better tool out there, I would love to hear about it. For now, this one does all that I need it to and more.



Another useful site, for all those that need to look at Mathematics on an extra special level, is the Answers.com math indexed site. It provides links to the wikipedia site when you select a topic as well. It may not be Wolfram, but it gives some easily digestible definitions to absorb at a glance. A real time killer when you need it.

Lately, I have been dealing with a plethora of large test data sets on the order of 15GB to 50+ GB file sizes for an in-house application, on which my team has been working. Multiple files with multiple record structures per file. The test runs are getting longer and longer time wise. I need to start poking around the internet to find out if anyone else has handled something similiar and what they did to speed up testing (if anything can be done).

Monday, June 15, 2009

Taking the PMP Test

I am slated to take the PMP certification test soon. Mostly at the bequest of my company. I wonder if this is a very marketable item in the Software developer employment world. Does anyone else recommend putting this on their resume? I know that my management looks favorably on this certification and is willing to pay for the test, but will it increase my chances of finding a position in a quality software shop if I ever seek employment elsewhere?

We will see. I have always been in the opinion that any chunk of knowledge gained is a good thing. The PMI site has a lot of study material.

Wednesday, June 10, 2009

C# Picture Viewer

It still amazes me how fast you can create a working example, and how little code it takes to get something going with .Net. I created a simple jpg picture viewer while I was watching "Everybody Loves Raymond" repeats on the TV. Heres the code I had to add for the application to work: (Ok, what's the trick for getting the C# style/formatting to show up in a blog? Anybody?)



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace formsStuff
{
public partial class Form2 : Form
{
private int fileIndex;
private DirectoryInfo dir;
private FileInfo[] files;
private string pictureDir;

public Form2()
{
InitializeComponent();
fileIndex = 0;
pictureDir =
@"C:\Users\Public\Pictures\Sample Pictures"
;
dir = new DirectoryInfo(pictureDir);
files = dir.GetFiles("*.jpg");
}

private void button1_Click(object sender, EventArgs e)
{
Application.Exit();
}

private void button2_Click(object sender, EventArgs e)
{
fileIndex++;
if (fileIndex >= files.Length)
fileIndex = files.Length - 1;

ShowPicture(fileIndex);
}

private void button3_Click(object sender, EventArgs e)
{
fileIndex--;
if (fileIndex <= 0) fileIndex = 0;

ShowPicture(fileIndex);
}

private void ShowPicture(int index)
{
mainPictureBox.Load(files[index].FullName);
}
}
}
No property name mods were done, because the defaults were sufficient for this example. The mainPictureBox member is a PictureBox component. And there are 3 Buttons. Two of the buttons advance the Picture being viewed forward and backward using a fileIndex. Basically, progressing through the pics 1 at a time. The other button exits the application. The directory info member and the array of files use is obvious in the example. Quick and simple, and you have a photo viewer that you can scroll through. It is so fast to create with .Net.


What this blog entails

The title says it all. I consider myself a new age polymath whose interests are constantly changing. I guess I identify with the likes of Thomas Young. Plus I believe I have an undiagnosed case of ADHD which can make for some mighty lazy attempts at completing a task. So if it appears that I am writing a great detail about a certain subject and then all of the sudden ....

Get the picture?

So, what's this blog going to be about? Well, since I am a Computer Scientist with a great deal of Math in my educational background, there will be some Math, Software, Math History, and some ramblings about science in general. No shockers there. Note well, I am not a speller and my grammar is right up there with my spelling, so please, no grammar/spelling nazis.

Math History: I just completed reading an autobiography about Thomas Young, interestingly enough. A guy who studied Math, Medicine, ... (read the wiki link above.) After reading a bit about Young it kind of strikes you that he possibly couldn't be a polymath today. It would be tremendously hard to conquer all the fields of study that he labored with in the 18th century, today. But, if he could stay away from Television, he might have a chance. Television tends to steal my productivity. It drains me of IQ points. I am sorry to admit that when a tv is on, and near me, I lose myself in a trance of some sorts. It sickens me. I wish I could get that monkey off of my back.

Anyway, I ramble. Read some of Young. If you have many interests, his journey will be enjoyable.