Jump to content

  • Log In with Google      Sign In   
  • Create Account

Chad Smith

Member Since 26 Jun 2005
Offline Last Active Jan 13 2016 11:35 PM

Posts I've Made

In Topic: When you realize how dumb a bug is...

13 January 2016 - 09:31 PM

happened yesterday at work:


Writing a quick file uploader for a web app. Put all my form inputs in place, get the section where you can drag and drop files in, write a few simple methods to return a list from the server to dynamically populate a drop down. Populate the drop down and....the drop down doesn't work? What? Why didn't it populated? Spend an hour looking for a stupid mistake in my code and going through documentation. Finally get irritated enough that I literally copy and pasted a hard coded example. Wait? Still doesn't work? The drop down isn't even registering my click event!?

Ask someone, he walks over and instantly sees that the section to drag and drop files was overlapping the drop down. I knew their was a reason I hated front end stuff. I'll stick to my server side stuff...wacko.png

In Topic: simple java question

11 November 2015 - 12:22 AM

i2 points to the same address as i does. so since i becomes "0", shouldon't i2 also be "0"?

In Java Strings are immutable. Basically there is nothing* that you could do to i that would affect the value of i2. They originally referred to the same object, the string "3." So it is a reference to an object, with "3" being the object. When you set i to "0" it just changes the reference, while the string object remained unchanged.



Note: I will be the first to admit that I do not program in Java. I am a C++ and C# programmer. I am just going off of what I believe I remember when I did learn Java. If my information is wrong I apologize. 

*I think you could use reflection to mutate a string (based off my quick research)? 

In Topic: Learn Java or C#

21 October 2015 - 02:13 PM

Honestly now days any language you choose from those two will be just fine.

I myself use C# and is what we use at work mostly. We are actually right now working on a OSX application in C# with Xamarin for a client.

But java will be just fine also. We also create java applications. I myself am a bigger fan of the C# language, but my point is really don't spend too much time over what language to use. Each has their own pros and cons.

In Topic: Is Javascript easy if you know basic C++

14 August 2015 - 08:29 PM

If your interest is to make some cross platform mobile apps using Javascipt then I would say look into Meteor (https://www.meteor.com/)


Microsoft has been pushing Apache Cordova a lot lately with Visual Studio, though I have never used it so do not know a lot about it, or how the performance is on a device.


I saw also somewhere in this thread you mentioning C#. It is also possible to do mobile development with C#. You can use Xamarin. (http://xamarin.com/)


I work as a Web App developer. When I started I was really only a backend developer with almost no JavaScript experience, just experience in server side stuff. I now use JavaScript every day and I did pick it up very quickly as others have said, it's a lot easier to pick up another language once you know the basics of programming. The concepts are pretty much the same. Though what can be confusing is how things work in JavaScript, and changing the way you think about things. It will be a challenge to learn exactly how JavaScript likes some things, and learning that will help a lot in writing efficient JavaScript code (JavaScript very actually be a very surprising language sometimes in the power of it when you dive deep down into it), but in terms of just programming in javascript in general? It's pretty easy to pick up.

If you use other libraries with it, like jQuery, it can get even more easier and powerful (though I will say I think some people just run straight to jQuery to help them to some things when it can be just as easy to do it in pure JavaScript).

In Topic: Different GCC Versions Resulting in Different Output

10 May 2015 - 11:33 AM

Sounds wierd. I can't see anything wrong.


You are initializing l2TotalTries to zero, right?


What the...Ok, that is what I get for coding at 2 in the morning I guess. 

I saw that last night and said "ahh, that's the issue, DUH!" Though after I fixed that I could of swore I tried it again on both my Universities linux machine and my Windows machine with gcc and it still gave the wrong output.  Though after doing that again today, setting l2TotalTries to zero works, as it should, and not initializing it to zero doesn't work.


Which I do sort of understand. l2TotalTries would be just garbage data, correct? So I can either get the desired results, or the wrong results. It seems using Visual Studio in both release and debug mode gives me the desired results when it is not set to zero. My friends Mac Book Pro did the same thing. While my University machines just used garbage data, and compiled under GCC on my Windows computer also resulted it in it being set to garbage data.


Little odd that different versions of compilers and different systems did different things to that variable. Though I understand that is not covered in the standard so the results are unknown. Guess I see why you always initialize your variables. Though I still swear that I tried that last night and it still gave unexpected results. Though I can't repeat it today.


I guess lets just ignore this post now. I do feel pretty dumb for making a mistake like that now and not understanding it. *embarrassed*