0

Open Thread - 06/11

Wichita

Open Thread for Monday!

tags:
Wichita
Julie said:
 
The meetup is coming up soon! June 30th at OJ Watson Park! Hope to see you there!
 
posted 894 days ago
Add Comment Reply to: this comment OR this thread
 
lindainks55 said:
 
Julie,

I don't want you to think I;m ignoring your post. I'm leary of saying anything...
 
posted 894 days ago
Add Comment Reply to: this comment OR this thread
 
 
Did I miss some drama while I was on vacation? Why would you be scared to say anything on the blogs?
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
Julie said:
 
Linda,
You have my private email if you want to say something.

Dave,
When the original meetup was scheduled on May 12 there was a bit of a blow up here on the blog about having guns (concealed carry) at the meetup. I can't accurately explain everything but it's in the archives if you have a couple hours.
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
lindainks55 said:
 
Not scared, leery (wary, distrustful, vigilant...). On this particular subject. The last time we were discussing a meetup a very immature little soldier boy decided to make it all about him and his gun and it went downhill from there. Talking of getting together should be fun and something we all look forward to; hope it can be this time.

Did you have a good vacation?

 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
lindainks55 said:
 
Sorry, Julie. I was typing while you were posting. I would just as soon keep talk of a public meetup PUBLIC. I look forward to it!
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
 
Yes, I had a TREMENDOUS vacation! I had never been on a cruise before, nor had I ever been to the Caribbean. It was 7 days of complete fantasy land. We hit Jamaica, Grand Cayman, and Cozumel, all of which were beautiful. We found it very hard to leave the ship and come back to the real world. However, the last day aboard my wife won a raffle for a 7-night cruise for two that we have to take within the next 12 months. That reduced the sting of leaving quite a bit! :D

so.... [sigh].... back to writing code!
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
lindainks55 said:
 
What a treat! A vacation that wonderful that gets to be repeated SOON! I can hear your smile in every word.
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
Danny said:
 
Dave,

That sounds like that was fun! My wife says one of these years she and I will "have" to go on a cruise.
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
Danny said:
 
Today, I've decided to talk about a programming practice called unit testing. I'll also use a real example that I'm currently working on(my own code that I do on my free time at home).

One of the interesting issues dealing with software development is adequately testing software. Software testers, who do not work with the code itself, are referred to as black box testers. Usually, they will put themselves in the mindset of the user with the sole goal of breaking the software the developer had written.

However, there is emphasis on wanting to make testing faster and more reliable. So there are tools that help to automate the testing process. Part of the toolset in automated testing is used by the "black box" tester, the one I'm going to talk about today is used by the "white box" tester or the developer. This is called unit testing.

What is a unit test? My own definition of the unit test is a piece of code that is written to assert that certain functionality works as expected. This functionality can be in a single method, or multiple methods, in a single class or multiple classes. Generally, I write a unit test on a method by method basis.

So I've started working on my 3rd iteration of my little multiplayer/multigame client and server. One of the things that the second iteration didn't make easy to do was unit testing. This particular iteration is going much faster, and testing with unit tests has helped fix alot of bugs before the server has even been made ready for the 'prime time'.

So lets use an example, the following method is used when the client first attempts to connect to my server. It isn't attempting to logon here, but do the initial connection work to setup secure communication between the client and server. That code looks like the following:
[code removed]

What this particular code does is expects that the client is going to send a public key for its connection, assigns an ID to the client(for future communication), and then generates a random session key for the client to use for the rest of the login process and returns that to the client. It then uses the clients public key to encrypt the session key that will be used later(not shown). As a side note, when I encrypt something with the clients public key, only the clients private key can be used to decrypt it.

The style of encryption described above is a simplified version of what may be used in secure transactions like buying something online. So I wrote a unit test that tested that this code did what I expected it to do. It looks like the following:

[Test]

public void testProcessMessage()

{

NetworkMessage nm = new NetworkMessage();

MessageTosser mt = new MessageTosser();

ConnectionProcessor cp = new ConnectionProcessor(mt);

RSACryptoServiceProvider rcsp = new RSACryptoServiceProvider();

StringManip sm = new StringManip();



nm.ClientId = 1;

nm.MessageType = 0;

nm.MessageSubType = 0;

nm.MessageToSend = Encryptor.ToBase64(rcsp.ToXmlString(false));



NetworkMessage reply = cp.ProcessMessage(nm);

Assert.IsNotNull(reply);

Assert.AreEqual(0, reply.MessageType);

Assert.AreEqual(0, reply.MessageSubType);

String data = sm.prepost(nm.MessageToSend, true, Resources.Delimiter);

long clientId = Int64.Parse(Encryptor.FromBase64ToString(data));

Assert.AreEqual(clientId, nm.ClientId);

data = sm.prepost(nm.MessageToSend, false, Resources.Delimiter);

String sessionKeyEnc = sm.prepost(data, true, Resources.Delimiter);

data = sm.prepost(data, false, Resources.Delimiter);

String sessionIVEnc = sm.prepost(data, true, Resources.Delimiter);

String sessionSaltEnc = sm.prepost(data, false, Resources.Delimiter);

String sessionKey =

Encryptor.BytesToString(Encryptor.DecryptRSA(Encryptor.FromBase64ToByteArray(sessionKeyEnc), rcsp.ExportParameters(true), false));

Assert.AreEqual(mt.GetClient(nm.ClientId).SessionKey, sessionKey);

String sessionIV =

Encryptor.BytesToString(Encryptor.DecryptRSA(Encryptor.FromBase64ToByteArray(sessionIVEnc), rcsp.ExportParameters(true), false));

Assert.AreEqual(mt.GetClient(nm.ClientId).SessionIV, sessionIV);

String sessionSalt =

Encryptor.BytesToString(Encryptor.DecryptRSA(Encryptor.FromBase64ToByteArray(sessionSaltEnc), rcsp.ExportParameters(true), false));

Assert.AreEqual(mt.GetClient(nm.ClientId).SessionSalt, sessionSalt);

}

As can be seen, there are a large number of Assert statements here. These are how I test that certain conditions are met. Such as the client receives the correct session key, and will be using the same session key as the server. This is important, as if these are not the same(exactly the same) then the client would never be able to login securely.

The nice thing about unit tests, is there speed at which they can detect something being broken if I were to change code in the connection function listed above. The downfall to unit testing is that development time can be as much as doubled. In my opinion the development time is worth it, as I can be more assured that my code is doing what is meant of it. Therefore black box testing can be testing functionality and still attempting to break the code.

Unit testing is used alot where I currently work, and even quite a bit in many open source projects. I don't know how pervasive it is in other development houses or private IT institutions. I suspect that, it may catch on as reliability of software become more and more critical as another way to catch bugs very early in development, there by reducing bugs later in development when they may be more difficult to fix.
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
tureli_do said:
 
Can we delete this last message some how? It didn't format very well at all in firefox. LOL
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
lindainks55 said:
 
Nothing on InstaSpot does well with Firefox. I have trouble doing anything other than posting simple words. AND, I refuse to go back to Internet Explorer!
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
Danny said:
 
Linda,

IE 7 isn't so bad. Really, I use it and Firefox. However, Firefox is my primary browser because it works well in Linux, Windows, and MacOSX.

 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
 
I beg to differ that nothing on InstantSpot does well with Firefox (or did you really mean some place called "InstaSpot"! :)), considering the fact that the development team uses Firefox and Linux exclusively. Obviously the comment by Danny above is an exception to that and I will go kill the code part out of it, but I would be interested in hearing or seeing screenshots on what else you see that doesn't "do well". Please don't take my response as defensive. I *really* do want to see so we can fix it.

And yes Danny.... Unit testing is underused (even too often by us!)
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
 
I have removed the code sample but left the unit test in. Let's see...
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
 
"Nothing on InstaSpot does well with Firefox."

Everyone's a critic ;)

 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
lindainks55 said:
 
Sorry I sounded so critical! I should always think more than I type and seldom do. I'm sorry. I'll try harder.

I wish I could tell you the problems I have but don't know enough to have the words. At my blog when making a new entry I have lots of trouble, but I'm positive most of it is because I don't know what I'm doing -- to the extent I don't know how to ask the proper questions. I get messages telling me I can't do that with Firefox.

I can't type in Word then copy & paste to InstaSpot without it removing much of the punctuation; especially apostrophes and quote marks.

I will pay attention and keep notes of the problems and get back to you.
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
 
That would be helpful. And for the record, to paste into the text editor for blog/page postings, you can just hit CTRL-V, which is the keyboard shortcut for pasting.
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
lindainks55 said:
 
Dave, I know what you wrote is crystal clear to you and easy, but I have to ask, instead of right clicking and choosing paste, I would depress the control key and the letter "v" key, then it would paste what I copied?
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
 
That is correct Linda. There are keyboard shortcuts like that for most common tasks. Examples:
CTRL-A (select all text)
CTRL-C (copy selected text)
CTRL-V (well... you know this one now)
CTRL-W (often closes the current window)
CTRL-T (in firefox this opens a new blank tab)
CTRL-Z (undo last change)
CTRL-S (often saves files you are working in)
... on and on and on.....

These shortcuts can be used throughout all Windows and Linux applications for the most part.
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
lindainks55 said:
 
Thank you. I was aware of shortcuts although I've never memorized them and find looking them up takes me much longer than just using the mouse. I don't know why a shortcut would work when right clicking and selecting doesn't, BUT I don't need to know any of the WHYS as long as it works!
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
 
It is actually a limitation with the editor that we use called TinyMCE. If the "why" bug ever gets the ahold of you, some googling "tinymce + firefox+ pasting" will show you know that you are not alone. :)
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
Danny said:
 
I take it what ended up happening with the code section, is likely it had some "formatting" code in it, unintentionally rest assured. Would be nice, if could use some kind of markup to indicate this is code don't format anything that is inside this markup block.

Ok, just nitpicking, granted this isn't meant to be a coding site. I just happen to share some of what I do so others may have an appreciation for what goes on behind the scenes of different types of computing applications. :D

Dave,

Which distro. of Linux do you use? I currently use Ubuntu, but have used OpenSuse and RedHat. Generally, I'll admit to this, I'm still a "Windows" person, but for my job Linux makes much more sense for me.

As for jobs, I'd like to find a job in the Denver area because it is where my wife is from, or in the Wichita, KS area which is where my family is from. However, I'm happy with the job that I currently have.

 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
 
Danny, we haven't applied some of the filtering in comments that we have on blog entries. BTW, if you wish to post code you certainly can on your blog http://turelido.instantspot.com/ . We partnered with our friends at http://codeshare.ulatu.com to make a really slick way to post code in your blog entries like I did here: http://daveshuck.instantspot.com/blog/index.cfm/20...

When you make a blog post in the control panel, look for the link that says "Insert code to this entry".

As for distros, I am currently using Ubuntu Fiesty, but have also played around a bit with openSUSE, Mandriva One, FC6, Debian, and CentOS. Aaron, who is the other half of the InstantSpot team has played with some others too. When it comes down to the nuts and bolts, Ubuntu is just more comfortable to use for me personally, mostly due to the way it manages resources and its package management.
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
Danny said:
 
Dave,

I'll have to look into using that for insert code samples there and then maybe, when I talk about tech on Tuesdays here, if I use code, just link to my blog.

Now, back to figuring out how to push password hashes to Active Directory Services from LDAP. I could send passwords clear text, but then I'd have to store that somewhere, which isn't really acceptable to me.
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
lindainks55 said:
 
I like the accents you guys use when speaking your foreign languages... You sound like natives; no one will ever guess you aren't!

You will be better for your skills! Research has shown that early exposure to a second language increases divergent thinking strategies, helping not only in language-related tasks, but also in areas such as math. Children early on have different ways of expressing themselves, such that they better understand there is more than one way to look at a problem and that there is more than one solution.
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
Nathan said:
 
You just don't quit do you linda? I am not even around and you are still bad mouthing me.

 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
Rox said:
 
Dave,

Sounds like you and your wife had a wonderful time! Which cruise line did you use? I ask because my oldest daughter works for one of them. Of course, we're biased. >grin<


Heads up, everyone, if you don't have a passport...something I need to apply for, just in case. Currently, if you fly out of the U.S., including to Mexico, Canada, and the Caribbean, you need a passport. Driving or by sea doesn't require one...UNTIL January 1, 2008, at which time, you'll need to have one.

Getting a passport used to take about 6 weeks from the time you apply. With all the new Homeland Security changes that took effect Jan. 1 this year, it is taking twice as long, and sometimes as much as 16 weeks. People are missing trips because of the lag time, which is caused by too many too fast to process. Some people have been able to get the time sped up by contact their Congressmen, but even that takes time.

I'm not planning a cruise or a trip out of the country...yet, but just in case, I think I will go ahead and apply for a passport. The price will be going up, too, so now might be a good time. The current application fee is about $90 if it isn't a rush. Be prepared to have one in the not-too-distant future for air travel WITHIN the U.S.
 
posted 893 days ago
Add Comment Reply to: this comment OR this thread
 
lindainks55 said:
 
Are you kidding, $90?? Well, not only the lead time has increased. Are they still issued for 10 years? If so, that still seems not overpriced. My first (and only) passport was obtained for our first trip to Ireland in 2002 so I still have another five years left on mine before expiration. My daughter gave her oldest a passport for his 18th birthday before she knew for sure he would be attending college near enough to the Canadian border that trips across were likely.

Tomorrow is your birthday, Rox! Are there special plans in the works? I hope so.

We had new gutters installed yesterday (something our insurance company bought us due to last spring's hail storm). We added covers. Our neighborhood is an old one with huge established trees that leave their leaves in the fall and their seeds in the spring. I am sooo excited about NOT cleaning gutters!

I've been watching some baseball; guess the excitement of the Shockers got me back into a game I used to watch as often as possible. The boys of summer are still spending an inordinate amount of time adjusting their boys. Do you think waxing would help?
 
posted 892 days ago
Add Comment Reply to: this comment OR this thread
 
 
Rox, when I went to the county office here, they told me that if I was lucky I would have my passport in 12 weeks. When my sister got them for her kids before the trip, they took just over 14 weeks. And yes, with photos and all it is pretty close to 90 bucks each.

And.... we took a Carnival Cruise aboard the Carnival Conquest. I have nothing but praise for their service... especially giving us another free cruise!
 
posted 892 days ago
Add Comment Reply to: this comment OR this thread
 
 
So did you guys see these t-shirts?
http://www.cafepress.com/instantspot.133325455

We thought you might like them! :)
 
posted 892 days ago
Add Comment Reply to: this comment OR this thread
 

Search