LessConf coming in October!

There is a new trend among web 2.0 companies; share, inspire, motivate, help and encourage! 

 I will be attending the LessConf on October 17th. The LessConf is a technology conference where some of the best people behind some of the best web 2.0 companies will be presenting their stories and insights. But what I find amazing is the novel concept of companies helping other companies and individuals to become a success. The LessConf is being hosted by LessEverything and two of the guest speakers are Gary Vaynerchuk of WineLibrary.tv and VaynerMedia.com, Mike McDerment of Freshbooks.com. Mike McDerment's FreshBooks.com is a direct competetor of LessAccounting, a product of LessEverything yet he is one of the speakers at the LessConf. I have seen this over and over in the web 2.0 marketplace, companies helping other companies, even if they are a competitor.

I am currently working on several web 2.0 projects and I hope to return from the LessConf with new ideas, new motivation and a burning desire to help others.

So my question for all my readers, what is it that I can do to help you pursue your goals?

 


Posted in: Programming  Tags:

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Johnny posted on May 12, 2009 11:56

In another life when I was a Microsoft Certified Systems Engineer working with products like Systems Management Server, Windows NT 3.51 Server, MS mail and MS Exchange there was a logo Microsoft used for all of it's server products. You can read about the program and logo here.

Here is a look at the image. See the squiggly lines?

 

Well, what is the point of this post are you asking?  Back in 1997 I became permanently enthralled with these 3 entangled lines. 

 

More to come.... Stay tuned...


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Johnny posted on October 8, 2008 04:20

I have recently been reviewing a lot of code from other developers. I always try to keep an open mind so if I see something another developer has done that I do a different way I am curious to which is the better way. Of course "better" is a very abstract word so I decided to look at it from a performance perspective since performance can be concretely measured.

The code that caught my attention was:

 bool isNotify = Convert.ToBoolean(ConfigurationManager.AppSettings["SomeSettingGoesHere"]);

normally I would have written the above code like this:

 bool isNotify = bool.Parse(ConfigurationManager.AppSettings["SomeSettingGoesHere"]));

Convert is a little more flexible than Parse but which one performs better? I did some test...

The Test:

In a method called TestParse() I looped 1 million times creatint an instance of a string, string varA = "true". I then Parsed that string using bool varB = bool.Parse(varA).Prior to starting the loop and after completing the loop I set a variable equal to the DateTime.Now and returns the TimeSpan between the two DateTimes and displayed it in milliseconds.

I also created a method called TestConvert and did the exact same thing except instead of using bool.Parse(varA) I used Convert.ToBoolean(varA).

I ran both of these methods from a console app and displayed the results:

 



as you can see the Parse method completed significantly quicker than the Convert method. I ran similar test of different types such as Int32 and decimal and received similar results.

Posted in: Programming  Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Johnny posted on June 27, 2008 05:20

A few days ago I was in a discussion with a friend of mine who interviewed for a senior level developer position. He mentioned that one of the questions he was asked in his technical interview was "Describe a scenario where you would use a Struct instead of a Class.". He told me he could not think of one. So this article is an attempt to both explain the differences between a Class and a Struct and also describe when a struct should be used instead of a class.

Reference Type vs. Value Type
One of the primary differences between a Class and a Struct is that a Class is a reference type and a Struct is a value type. What does this mean? Well, let's take a look at other value types. All of the primitive types such as int, bool, decimal etc. are value types. Value types are stored in the stack as a single space in memory whereas refernce types are created in memory and a reference to that space is also create. The reference type is always accessed via the reference and not directly. For example;

Point p1 = new Point();       //Point is a Struct
Form f1 = new Form();       //Form is a Class

Point p2 = p1;
Form f2 = f1;

In the above code example p2 is an independent copy of p1. If you were to change a value of a property of p2, p1 would not be affected. Whereas f2 is a copy of the refence to f1 there for f1 and f2 are both references to the same object in memory. If you were to change a value of a property of f2, f1 would also be changed.

Heap vs. Stack
The stack is a simple FILO (first in last out) memory structure. The Stack is a highly efficient memory structure that "bookmarks" the stack when a method begins execution, Dumps data into the stack during the method execution and once the method exection completes the stack is reset to the bookmark releasing all the method's allocated memory.

The heap is just the opposite. The heap can be considered, for lack of a better term, a random access memory structure. Objects can be allocated and deallocated in a random order. The heap requires the use of a memory manager and garbage collector to maintain it's structure.

When you instantiate a class the instance of the class itself is stored in the heap whereas the reference to the instance of the class is stored in the stack.

Form f1 = new Form();

The actual object created by the above code will be placed in the heap and the reference, f1, to that object is stored in the stack.

When to use a Struct
Keep the following rules in mind when using a struct:
- a struct should represent a single value
- a struct should have a memory footprint less than 16 bytes
- a struct should not be changed after creation.


Posted in: General , Programming  Tags: , , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Search Blog Post

Follow me on

Twitter Updates

    Recent Comments

    Disclaimer
    The opinions expressed herein are my own personal opinions.

    © Copyright 2010 Johnny Can't Code