Programming Thread

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

0 Members and 4 Guests are viewing this topic.

Go Down

the-pi-guy

I love programming, and I know a handful of people here also enjoy programming (or at least they do it), so why not have a thread for it?  



C++ will kill me.  

kitler53

what languages does everyone know?

i learned on c and basic but my work mostly uses c# which i spent some time getting acquainted with but i don't really know it. 


Featured Artist: Vanessa Hudgens

the-pi-guy

-Decent at Java
-Learning C++
-Probably doesn't count, but "TI-BASIC" it's for calculators.  :P

Legend

I use PHP, Javascript, C#, and Cg/HLSL on a regular basis. 100% self taught with these so I only know what I've needed to use.

Took classes involving Python, C++, matlab, and excel's stuff but saying I'm rusty would oversell my abilities.

darkknightkryta

I love programming, and I know a handful of people here also enjoy programming (or at least they do it), so why not have a thread for it?  



C++ will kill me.  

As I say to my students: "Be kind to C and C will be kind to you."

the-pi-guy

Testing code:
*list works, adds in for loop*
*stops working*
*takes out loop*
*works*
*puts loop back in*
*stops working*
*takes out loop*
*works*
*puts loop back in*
*works*

I'm not sure what happened, but it works!  

ethomaz

Right now I'm planning to create a Pilates Manegement System for my girlfriend in PHP (just because she can access from any device via Internet).

:)

the-pi-guy

Mar 28, 2016, 03:34 AM Last Edit: Mar 28, 2016, 03:40 AM by the-pi-guy
If anyone has C++ knowledge, I'd like some help.  

I'm getting an error that says "does not define this operator or a conversion", but I have defined the operator, and Visual Studio even takes me to the operator when I ask for it.  

Figured it out.  
It likes it this ++way, and not this way++.  

Legend

What's the difference between c++ and c#?

++way seems foreign to me.

the-pi-guy

What's the difference between c++ and c#?
Haven't used C#, but from what I've seen it looks a lot like Java.

Some random person says this:
Quote
C# and Java discard C for C++. They take C++, throw away the pointer notation, and all variables become hidden pointers (except for the value types, primitive types, due to performance reasons). They add forcibly garbage collection, metadata to your classes, all the objects will be derived from a base class, called object or Object, which adds automatically virtual methods to objects, and they never compile to native code
++way seems foreign to me.
Same.  :P
I spent like half an hour, only to find the fix is putting it on the other side.  
I pretty much always write it like foo++, but this apparently needed to be written ++foo.  Not exactly sure why.  

darkknightkryta

Haven't used C#, but from what I've seen it looks a lot like Java.

Some random person says this:Same.  :P
I spent like half an hour, only to find the fix is putting it on the other side.  
I pretty much always write it like foo++, but this apparently needed to be written ++foo.  Not exactly sure why.  
The ++var notation needing to be necessary seems very weird.

ethomaz

Mar 28, 2016, 04:16 PM Last Edit: Mar 28, 2016, 04:20 PM by ethomaz
Haven't used C#, but from what I've seen it looks a lot like Java.

Some random person says this:Same.  :P
I spent like half an hour, only to find the fix is putting it on the other side. 
I pretty much always write it like foo++, but this apparently needed to be written ++foo.  Not exactly sure why. 
There are differences.

++var add first and return the val after

var++ return the val first and add after

Eg.

a = 1
b = ++a 
// result b = 2 ; a = 2

a = 1
b = a++
// result b = 1; a = 2

It is weird but that is what happen in most modern languages.

And the languages are dropping this ++ -- notation... this sintax will be deprecated soon.

Edit - A good explanation why modern languages are dropping ++ --

https://github.com/apple/swift-evolution/blob/master/proposals/0004-remove-pre-post-inc-decrement.md

Swift 2.0 didn't compile with ++ or -- code anymore.

the-pi-guy

There are differences.
Yep I know all about the differences.  I just tend to try to make it work with foo++;
But in this case, it wasn't working at all with foo++;
Saying the operator wasn't defined for the class, even though it clearly was.  

ethomaz

Yep I know all about the differences.  I just tend to try to make it work with foo++;
But in this case, it wasn't working at all with foo++;
Saying the operator wasn't defined for the class, even though it clearly was. 
I like them... how the code looks with these operators but there are movement in the dev scheme to drop them from all languages.

I'm not using them anymore just for the sake to don't need to review my code in the future.

Legend

I like them... how the code looks with these operators but there are movement in the dev scheme to drop them from all languages.

I'm not using them anymore just for the sake to don't need to review my code in the future.
So instead they want us to write out foo+=foo?

Go Up