Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

AKAJamie

@AKAJamie
About
Posts
16
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • What Sci-Fi planet would you like to live on?
    A AKAJamie

    How 'bout Reisa? The weather is great as long as Vanessa Williams is not visiting....

    The Lounge com question

  • Microsoft on Multithreading
    A AKAJamie

    There's a sentence in the following paragraph of the article you refer to which states: "WPF comes close, but there are still situations where multiple threads improve user interface (UI) responsiveness or application performance." The truth of the matter is as follows: presently there exist dual core processors and not too far in the future there will be processors with even more cores. Single threaded application design does not take the best advantage of these new hardware configurations. It seems the individual at Microsoft that wrote the article is very knowledgeable of WPF and perhaps what is written in the article did not come across as he intended. I helped Jeffrey Richter with the creation of "CLR Via C#." And actually, it was upon my suggestion that he added a very good chapter on thread synchronization. (Which is why it is the last chapter of the book - for those of you into trivia). If anyone is interested in learning about threading concepts then I highly recommend that chapter. In my opinion, using multiple threads versus using the application main thread is a choice a company or developer makes in order to determine how responsive an application's ui is. For example, look at Outlook and you will see that application is unresponsive while performing a good number of its tasks. In contrast, look at a program like inTriever, www.intriever.com, which is multithreaded (I made inTriever but am only mentioning it as an example for the sake of this discussion) and notice the ui remains responsive at all times. If you compare a single core system to a hyperthreaded or multi core pc you will see the added benefit a multi-threaded program like inTriever provides whereby a single threaded application like Outlook does not take full advantage of the extra processing power. Not every application needs a multithreaded design if, for example, the functionality it offers is simple and does not require a lot of processor resources. However, applications seem to be getting more and more complex in order to provide more advanced features. IMHO, multi-threaded application design is a necesary evil in order for the new generation of applications to provide the new functionalities the general public wants.

    The Lounge visual-studio com debugging question

  • Cleverness
    A AKAJamie

    In your example, when list[i].Value == 255 your code will take an index out of range exception. Although your count array is 255 items in size it's index range is zero to 254. You can use 256 as the size of the count array, and change the for loop comparand instructions from i < 255 to i < 256 and then your code will not cause any exceptions when the list[i].Value == 255. Also, you may want to consider creating a local variable like this "int SizeOfList = list.size" just before your second for loop instruction and changing the comparand instruction from "i < list.size" to "i < SizeOfList". This way your loop won't cause the system to push the stack and branch to the list.size property during each iteration of the loop. Overall, I enjoyed reading your post.

    The Lounge csharp php wpf com question

  • Wii
    A AKAJamie

    I just finished playing the Paper Mario series. Starting with the first one for the NES which I downloaded from the store in the WII, then I played "The thousand year door" which is a game cube game, (my newphew lent me one of his game cube controllers, and I had to buy a gc memory card), and then I finished with Super Paper Mario for the Wii. They all were AWESOME!!! Rayman is a lot of fun, especially when you get to the end and he gets back at the bird...

    The Lounge c++ game-dev testing beta-testing architecture

  • MSDN Documentation - Love it? Hate it?
    A AKAJamie

    I read the first sentence which states: "The purpose of this survey is to gather input on how and when Visual Studio content is used, how satisfied customers are with it, and where areas of improvement exist." Since "where areas of improvement exist" sounds like it was written by someone who does not speak English I'm not going to waste time on this.

    The Lounge com architecture tutorial question

  • Algorithm Complexity
    A AKAJamie

    Off the top of my head if you are only talking about +, -, *, /, sin, cos, tan, cot, sqrt maybe you could break it down as follows. Knowing that computers only know how to add, and achieve other arithmetic functions such as subtracting by fliping bits to get the twos complement and then adding the result to the first number, and calling algebraic functions like sin and cos for example in C# can involve calling methods of the Math class (e.g. Math.sin) then maybe you can say: for arithmetic functions a average weight of 1 can be used due to the relatively lesser number of instructions executed to accomplish the task. Calling methods of the Math class involves pushing the current stack and branching to the instruction address of the method in the class which itself may cause other functions to be called whose end result is calling a number of arithmetic functions to be executed. So say you give trigonometric function calls a weight of 10 because pushing the stack executing instructions and function calls and then popping it again to return where you called the function from is very expensive machine cyclewise. So for example say you are calculating some kind of transform that involves both arithmetic and trigonometric functions like "1 + Math.sin(x)" you would assign a weight of 1 to the addition symbol and add a weight of 10 for calling the trigonometric function "sin". Of course, in the case of sin, cos, tan, and cot, if one were to be more precise then each function would have its own weight since each does cause a different number of instructions to be executed; albeit sin and cos would be pretty close in number of instructions, while cot would add a weight of one for the arithmetic function of dividing one by the tangent. It all depends on how precise you want to be. You could drive yourself crazy trying to be exact with these metrics. I personally like the simple route by just saying arithmetic functions have an average weight of one and trigonometric functions have an average weight of ten. Of course this is just me speaking extemporaneously maybe somebody else can tell you a better way of doing this.

    The Lounge algorithms csharp html com tools

  • Help with SQL Server (NOT A programming question) [modified]
    A AKAJamie

    My name is Jamie Haddock. I helped Jeffrey Richter with the creation of 'CLR via C#" (Microsoft Press - See acknowledgement section of book). It concerns me deeply to hear about your situation. And it concerns me even more to hear the choices your DBA has made for the variable types your application uses. Based on what you have stated regarding the uncooperative nature of your DBA, I recommend you review your application's SQL DB requirements with your management and let them decide how best to deal with the DBA. You sound like your understand what you are talking about. Explain it to your management. If they disagree with you then you'll have to decide if you want to remain in that work environment.

    The Lounge csharp database wpf question sql-server

  • Assembly
    A AKAJamie

    The fit looks like a nice small form factor pc. It states it can run XP or Linux which is nice. It's too bad that it only has 256 MB of memory that cannot be added to. So you want to understand how your C++ code is executing after being translated to assembler. So in essence you're asking what is the best C++ coding style to write that will generate the most efficient assembler? You can start by making sure you have the 'Optimize' option selected in your project properties settings in Visual Studio. The Optimize option actually will cause the compiler to create more efficient assembler. And it really works. Try running a cpu intensive test project with and without that option and you can see the difference in how your code executes. As for .NET there are some simple tricks you can do to write better code. One example is: if you use a 'Get' property in a method more than once, you'd want to create a local variable and call the property once and store the return value in the local variable and then use the local variable in the rest of the method. A 'Getter' property is essentially a method call so reducing the number of those will improve your code. And of course, never ever use a Get property in a loop statement as that will cause the property (AKA method call) to be called at every iteration which would slow down any loop considerably. I hope my ramblings are helpful to you. It's good that you are thinking about the bigger picture and trying to understand how your source code affects your object code.

    The Lounge question learning

  • Assembly
    A AKAJamie

    Out of curiosity, what language are you using to write your code? If it's not a .NET language then you're on the right track. If it is a .NET language then you would want to learn about IL.

    The Lounge question learning

  • Hiring Graduates
    A AKAJamie

    There are pros and cons to hiring fresh graduates. Some pros are you can pay them less because they are inexperienced, and you can mold them to the way things are done at your company. A con to hiring a graduate would be the fact that it will take time for them to learn and so will be unproductive until the process of learning is well under way. I know companies that had deviced non programming 'logic' tests in order to see if candidates had the aptitude to be software developers. Maybe a search in Google would turn up some info on that type of testing. I'm surprised your company only received 20 CVs. Has you company posted an ad in Dice.com or Monster.com?

    The Lounge csharp java php database sql-server

  • win32...MFC...obsolete?
    A AKAJamie

    No. The .NET platform is built on top of the Win32 platform. All Win32 function calls are accessible from .NET. That's a good thing since .NET does not implement wrappers for all Win32 functions. MFC is on its way out. Although the last time I spoke to Jeff Prosise he told me that quite a bit of development in India is still done with MFC. .NET simplifies the programming model for accessing the Windows operating system's functionality and provides value adds like the Garbage Collector, and a permanently allocated thread pool so that calls to instantiate worker threads are faster than in classic Win32 programming.

    The Lounge csharp c++ question

  • Caffine Consumption
    A AKAJamie

    When I need to get up earlier, I just go to bed earlier the night before. I discovered when I make sleep a priority and make sure I get at least 8 hours of it every night that I am well rested the following day. I also don't drink alcohol during the week because alcohol reduces the quality of sleep.

    The Lounge question career

  • Best C++ Book to get?
    A AKAJamie

    "C++ Primer" by Lippman and Lajoie. Nothing else will do.

    The Lounge c++ question learning

  • Pointy-haird bosses
    A AKAJamie

    .NET compared to the way things are done with MFC or 32 bit Windows Programming makes development faster. .NET was a reorganization of all windows "controls" into a logical class hierarchy whose base class is of type 'object.' With 32 bit windows programming it was up to the developer to code the application's message pump and applications also had these long switch-case blocks to test for all the different windows messages they wanted their application to react to. You don't have to do any of that with .NET which means you don't have to remember all the different names for windows messages or what goes in a WParam or LParam of a windows message. .NET also provides help to developers via the CLR. In C++ 32 bit windows programming developers have to remember to deallocate the resources they allocated, in .NET object destruction is taken care of by the garbage collector, .NET provides delegates as a way of registering a method (or function in C++ jargon) with a type so that it is called when a certain object state occurs, and .NET provides properties to allow you to access a type's visible variables. I could on about the benefits that .NET provides. For the sake of brevity you can read more detail about what .NET and the CLR do to help you develop faster, and better, in a book titled "CLR Via C#" by Jeffrey Richter (MS Press). I helped Jeff write the book so I guess I know a bit about the topic. I didn't get a t-chirt for helping but at least I'm mentioned in the acknowledgement section. :O) As for Pointy haired bosses, I would ask them why they committed to the .NET technology without fully understanding what it is; sounds like an impulse decision, albeit the right one. Jamie Haddock

    The Lounge csharp question

  • Equity in a startup
    A AKAJamie

    No. That first person was only going to have one responsibility while I shouldered the rest. Again, I believe all parties in this situation should first sit down and fully understand what they are going to contribute and what is expected of them, that way they can have a feel for what percentage of the whole effort they are contributing and then can better determine what they deserve based on what they're going to put into it; whether it's money and/or work. It takes a certain personality to make it in the start up environment. There are a lot of eager people that want to get involved. A lot of them don't last though because once they get in they find out it is a lot of work with few and far between rewards. In the case of my first person, they got out before even starting once they realized they couldn't meet the commitments they made. I wound up getting even better people to help out, who took on more responsibilities, and are getting a commesurate share. Hope that helps...

    The Lounge sales design discussion

  • Equity in a startup
    A AKAJamie

    I'm in a similar situation except I'm the owner. I did two things with the first person I took on: we signed an NDA (non disclosure agreement) since the patent application was not complete, and we signed a letter of agreement that covered our responsibilities and share in the business. We had witnesses present at the signing of both documents. You should check your local laws as to the proper way to enter into a binding written agreement. Hope that helps... By the way you can see my startup at: www.intriever.com, and feel free to leave me some feedback as to how I can make it better for you. Cheers!

    The Lounge sales design discussion
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups