Valhalla Legends Forums Archive | General Programming | Languages in the workplace

AuthorMessageTime
shout
If I wanted to purse a programming career what languages should I learn? I was thinking mostly Java and C++ but I want people with programming jobs to give some input.
November 17, 2005, 8:32 PM
FrOzeN
First, I don't have a programming job.

But one main factor which would affect this is, what type of programming do you want to do as a career. Game/Driver programming or Application programming?
November 17, 2005, 9:58 PM
Yegg
[quote author=FrOzeN link=topic=13268.msg134397#msg134397 date=1132264710]
First, I don't have a programming job.

But one main factor which would affect this is, what type of programming do you want to do as a career. Game/Driver programming or Application programming?
[/quote]
I'm pretty sure Shout knows what questions to consider. Which is why he expressed the fact that he wanted help from someone with a career that involves computer programming.
November 17, 2005, 10:34 PM
Quarantine
Programming branches off and different languages are better for different tasks. Now, how does Game development and Driver development mix enough to be used as "Game/Driver"?
November 17, 2005, 10:35 PM
shout
Obviously there is going to be some variation, I was wondering the main languages it would be good to be familiar with.
November 18, 2005, 1:46 AM
Quarantine
Hmm.. Well C/C++ is a must but depending on the job description I'd say some .NET language. Okay okay just learn them all! (Or as much as you can)
November 18, 2005, 1:49 AM
iago
Most jobs that I'm aware of (where I live, anyway) are Java or web (ASP, JSP, HTML, etc.).  Very few jobs I know of are C, C++, or VB, only a couple out of each of those that I'm aware of.  But it really depends on your target job, as somebody else pointed out. 

At my first programming job, it was JSP/Servlets, which is Java. 

At my second and third job, it wasn't really heavy into programming, but the development I DID do was in Java and Perl. 

If you plan to do security or networking, make sure you know Perl.  It's the #1 language for writing quick and dirty scripts, and it does that really well.  I've seen so many people suffering through menial tasks that could be coded in 5min with a Perl script. 
November 18, 2005, 1:56 AM
Kp
[quote author=Warrior link=topic=13268.msg134404#msg134404 date=1132266953]Now, how does Game development and Driver development mix enough to be used as "Game/Driver"?[/quote]

Well, you can't expect to have very good Digital Restrictions Management for your game without a highly invasive driver, can you? ;)
November 18, 2005, 3:08 AM
Quarantine
Well I was referring to in general driver development for say some hardware you write. :(
November 18, 2005, 3:11 AM
KoRRuPT
You should learn Fortran.
November 18, 2005, 3:13 AM
FrOzeN
I didn't mean to 'mix' Game/Driver Programming, I was trying to group them.

As I'm here I'll give my input.

It seems the new revelation of Application programming has entered into the .NET Framework. So if you wish to focus on Application programming knowing C# would be very promising.

If you wish to do Web Development, the major is currently ASP.net aswell as ASP still. I've been focusing on php lately as I'm building my clan's website and I find it very easy to learn. On the site phpfreaks.com which I've been idling about I've noticed quite a few jobs appear here, though  I'm guessing you'd be working with them over the net opposed to in a office/in-person (and obviously best to know (x)HTML/CSS to top it off).

If your interested in developing your career for making games. C++ is the major for this, especially considering that 99% of games made, are developed with it. Also to try and preempt the type of game programming you wish to do, learning to use DirectX/OpenGL/DirectDraw7 would also give you a little headstart/insight into this.

If you wish to do Driver programming your aiming for maximum portability and as it should be written in a high-level langauge C/C++ fits in perfectly. Also the majority (if/not all) of the windows kernal/user -mode drivers are made in C/C++.

[quote author=iago link=topic=13268.msg134428#msg134428 date=1132279018] Most jobs that I'm aware of (where I live, anyway) are Java or web (ASP, JSP, HTML, etc.).[/quote]
Personally, when picking a career I would go out of my way to find what suits me and which I prefer best. I'd rather work over the net or something with a programming language I love, opposed to work using a language that isn't much of a favourite even if they were 3 blocks away.

This 'is' a Career your choosing and almost any language is out there and available for hiring programmers. So if your really focused on something; follow it.

[EDIT] And yes, I realise you said 'in the workspace' though I find what I have suggested 'could' be found within a reasonable area.
November 18, 2005, 3:32 AM
iago
Have people actually started writing drivers in C++?  I couldn't even imagine doing some of the onboard programming I've done in C++, what a mess it would make..
November 18, 2005, 4:50 AM
FrOzeN
Well I heard that C/C++ is best for driver programming awhile back. But before I stated that I did a quick google, then kind of relayered what MSDN had to say. :P

MSDN Link

[EDIT] Made link shorter.

[EDIT 2] Come to think of it I may of got this all wrong, that it's best to 'work with' window drivers in C/C++?
Sorry if that's the case.
November 18, 2005, 5:08 AM
Quarantine
Why do people seem to think of C/C++ as the same thing? One totally rocks the other is totally object oriented!
November 18, 2005, 5:18 AM
Kp
[quote author=iago link=topic=13268.msg134461#msg134461 date=1132289449]Have people actually started writing drivers in C++?  I couldn't even imagine doing some of the onboard programming I've done in C++, what a mess it would make..[/quote]

Well, it depends on which C++ features you use.  For instance, I classify almost all my source as C++ just to turn on the strict type checking (linker errors on mismatched prototypes and no implicit cast-from-void, for instance).  Some projects will make use of inheritance, destructors, or other clever features (where a clever feature is anything that causes implicit or non-obvious code generation, which I can see might be a definite downside when trying to write a driver and ensure that it does exactly what you say), but others just use it as "C with more strict checks."
November 18, 2005, 5:33 AM
iago
[quote author=Kp link=topic=13268.msg134474#msg134474 date=1132292006]
[quote author=iago link=topic=13268.msg134461#msg134461 date=1132289449]Have people actually started writing drivers in C++?  I couldn't even imagine doing some of the onboard programming I've done in C++, what a mess it would make..[/quote]

Well, it depends on which C++ features you use.  For instance, I classify almost all my source as C++ just to turn on the strict type checking (linker errors on mismatched prototypes and no implicit cast-from-void, for instance).  Some projects will make use of inheritance, destructors, or other clever features (where a clever feature is anything that causes implicit or non-obvious code generation, which I can see might be a definite downside when trying to write a driver and ensure that it does exactly what you say), but others just use it as "C with more strict checks."
[/quote]

I typically compile all my code (lately) with "gcc -Wall -ansi -std=c89 [....]".  Since most of what I'm doing is homework and has to work on a variety of machines (my home Linux, school's Solaris, who knows what else profs/markers use), I like conform to older standards.  But that's just me. 

I don't like purely OO C++ code.  I don't think C++ does a very good job at OO, everything just ends up looking like a mess.  But that's more of an opinion than  fact. 
November 18, 2005, 10:54 PM
shout
[quote author=iago link=topic=13268.msg134573#msg134573 date=1132354461]
I don't like purely OO C++ code. I don't think C++ does a very good job at OO, everything just ends up looking like a mess. But that's more of an opinion than fact.
[/quote]

Same with me, I find that OO C++ seems to just be messy.
November 18, 2005, 11:26 PM
JoeTheOdd
I'm not a programmer for a living, but I want to ++ my post count (kidding), so I'll post.

Probably C++. I think I read somewhere that the programming world is leaning towards Java, but oh well. If you plan to program in the mathematics field, you will probably want to learn x86 assembly as well. The reason I say this, is although C++ is efficient, even seemingly trivial tasks can produce MANY processor cycles and slow you down a whole lot. For example, finding the prime factorization of 5444 in Visual Basic (using code I wrote, but its about as efficient as it can be) took a good two seconds.  With inline assembly, you're probably going to cut the processor cycles used by half, if not more, causing it to run twice as fast, if not more.

Thats my opinion, as invalid as it may be. =p
November 30, 2005, 12:48 AM
rabbit
That took less than a second with my Java code.  Maybe you just need to learn to code efficiently?

Took less than a second with my VB6 code too, and not very long with my PHP code either;
November 30, 2005, 1:24 AM
Myndfyr
Wow Joe, that's.... really sad.

It takes my C# code approx. 6.5 seconds to perform prime factorization 1,000,000 times on random numbers less than 9998.  My code can be found here.

[pre]
This program is capable of finding prime factors of numbers up to
(but not including) 9998.
What value would you like to find primes for?
8988
This program will now verify that your number is not prime before attempting to
factor it.
The largest number that can be a factor is 4493 at index 609.
The program is now determining prime factors of 8988.
5 prime factors were found for 8988:
107, 7, 3, 2, 2
The program will now perform a test to evaluate the amount of time
required to calculate the prime factors of 1 million random numbers.

There was a total time of 00:00:06.6404550 required for 1000000 iterations.
[/pre]
November 30, 2005, 2:22 AM
iago
[quote author=Joe link=topic=13268.msg135765#msg135765 date=1133311708]
I'm not a programmer for a living, but I want to ++ my post count (kidding), so I'll post.

Probably C++. I think I read somewhere that the programming world is leaning towards Java, but oh well. If you plan to program in the mathematics field, you will probably want to learn x86 assembly as well. The reason I say this, is although C++ is efficient, even seemingly trivial tasks can produce MANY processor cycles and slow you down a whole lot. For example, finding the prime factorization of 5444 in Visual Basic (using code I wrote, but its about as efficient as it can be) took a good two seconds.  With inline assembly, you're probably going to cut the processor cycles used by half, if not more, causing it to run twice as fast, if not more.

Thats my opinion, as invalid as it may be. =p
[/quote]

CPU speed, harddrive, and RAM are much, much cheaper than hiring developers. 

If you have 10 programmers, 40 hours a week, $40/hour (the cost of having them, not what they're being paid), that's $16,000/week.  If you can reduce a project by a week, but it's going to cost you $12000 in hardware, you're saving $4000.  And $12000 is a lot of hardware. 

That's why Java and C# are so popular, they save on programmer hours, which is the most expensive resource. 
November 30, 2005, 2:40 AM
JoeTheOdd
@MyndFyre:
[code]private static readonly int[] primes = new int[] {...}[/code]
You cheated. =p

[code]Public Function PrimeFactorization(ByVal p_lNumber As Long) As String
          Dim m_sReturn As String, m_lNumber As Long, I As Long
10        m_lNumber = p_lNumber
20        For I = 2 To m_lNumber
30            If Not IsPrime(I) Then GoTo 90
40            If IsDivisible(m_lNumber, I) Then
50                m_lNumber = m_lNumber / I
60                Call strcat(m_sReturn, CStr(I) & " * ")
70                GoTo 40
80            End If
90        Next I
100      m_sReturn = Left(m_sReturn, Len(m_sReturn) - 3)
110      PrimeFactorization = m_sReturn
End Function

Public Function IsDivisible(ByVal p_lValue1 As Long, ByVal p_lValue2 As Long) As Boolean
    If p_lValue2 = 0 Then IsDivisible = False: Exit Function
    If Int(p_lValue1 / p_lValue2) = (p_lValue1 / p_lValue2) Then
        IsDivisible = True
    Else
        IsDivisible = False
    End If
End Function

Public Function IsPrime(ByVal p_lValue As Long) As Boolean
    Dim I As Long
    For I = p_lValue / 2 To p_lValue
        If IsDivisible(p_lValue, I) Then IsPrime = True: Exit Function
    Next I
    IsPrime = False
End Function

Public Sub strcat(ByRef p_sString1, ByVal p_sString2)
    p_sString1 = p_sString1 & p_sString2
End Sub[/code]

And I shouldn't even be using strcat, but eh?
November 30, 2005, 2:58 AM
Myndfyr
[quote author=Joe link=topic=13268.msg135785#msg135785 date=1133319512]
[code]private static readonly int[] primes = new int[] {...}[/code]
You cheated. =p
[/quote]
No.  Prime numbers are known.  I got those primes from prime-numbers.org.  Why would you call a library function to determine when a number is prime when you already know them?  You said your code was pretty much as optimized as possible.  That is a major optimization and it's almost completely free; it took up 610*4 bytes, or 2440 bytes.

November 30, 2005, 3:18 AM
UserLoser.
[quote author=Joe link=topic=13268.msg135785#msg135785 date=1133319512]
@MyndFyre:
[code]private static readonly int[] primes = new int[] {...}[/code]
You cheated. =p

[code]Public Function PrimeFactorization(ByVal p_lNumber As Long) As String
          Dim m_sReturn As String, m_lNumber As Long, I As Long
10        m_lNumber = p_lNumber
20        For I = 2 To m_lNumber
30            If Not IsPrime(I) Then GoTo 90
40            If IsDivisible(m_lNumber, I) Then
50                m_lNumber = m_lNumber / I
60                Call strcat(m_sReturn, CStr(I) & " * ")
70                GoTo 40
80            End If
90        Next I
100       m_sReturn = Left(m_sReturn, Len(m_sReturn) - 3)
110       PrimeFactorization = m_sReturn
End Function

Public Function IsDivisible(ByVal p_lValue1 As Long, ByVal p_lValue2 As Long) As Boolean
    If p_lValue2 = 0 Then IsDivisible = False: Exit Function
    If Int(p_lValue1 / p_lValue2) = (p_lValue1 / p_lValue2) Then
        IsDivisible = True
    Else
        IsDivisible = False
    End If
End Function

Public Function IsPrime(ByVal p_lValue As Long) As Boolean
    Dim I As Long
    For I = p_lValue / 2 To p_lValue
        If IsDivisible(p_lValue, I) Then IsPrime = True: Exit Function
    Next I
    IsPrime = False
End Function

Public Sub strcat(ByRef p_sString1, ByVal p_sString2)
    p_sString1 = p_sString1 & p_sString2
End Sub[/code]

And I shouldn't even be using strcat, but eh?

[/quote]

40            If IsDivisible(m_lNumber, I) Then
50                m_lNumber = m_lNumber / I
60                Call strcat(m_sReturn, CStr(I) & " * ")
70                GoTo 40
80            End If

w-t-f?

[code]
While (IsDivisible(m_lNumber, I)
...
Wend
[/code]
November 30, 2005, 3:22 AM

Search