Page 1 of 3 123 LastLast
Results 1 to 16 of 42

Thread: How do people still program C++/Java without crying?

  1. #1
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,168
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts

    How do people still program C++/Java without crying?

    I mean, they've just stood still for the last few years.

    I just die a little inside every time i have to drop down to C++ world, most often this is because i'm doing some interop with .Net and its the only way i can do dodgy things with pointers.

    But this begs the question, why are people still making new projects in these languages that i'll end up having to work with?

    I mean stuff like this in C#
    Code:
    string.Join(",",assetsMissingWeights.ConvertAll(x => x.BbgCode).ToArray())))
    I find incredibly anoying because i need the ToArray, because the tits who made the string class, used an array rather than an IEnumerable<string>....

    its also worth nothing this is a great example of lamba +linq in C#, we have a List of 'Asset' object, which i want to generate a Comma seperated string of one of its properties. A clean example of it working how it should could be seen the line before:
    Code:
    List<Asset> assetsMissingWeights = assets.FindAll(x => !weights.ContainsKey(x));
    But thats nothing of the pain i feal when i C++. And java, well its been 5 months, 2 weeks, 1 day, and about 5 hours since my last line.

    I think CS suffers greatly from people been luddites, sticking with languages they know. No i don't think we should all write apps in Python, but i think people really should learn more of the obscure and very interesting languages (Boo and Nermle been a good two) so we can put pressure on the decision makers of these main languages and not have to work with such verbose languages.

    Its shocking that so few people actually leverage these features that are present in a language like C#, i've been able to re-write this very 2.0 style code to be about 45% lines less... In doing so made the bug very obvious, these functional style language paradigms do make business sense.
    throw new ArgumentException (String, String, Exception)

  2. #2
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,026 times in 677 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: How do people still program C++/Java without crying?

    doesn't java have generics too as of 1.5?

  3. #3
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,168
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts

    Re: How do people still program C++/Java without crying?

    yes, but there a compiler trick.... thats another reason to loath them.

    The thing i'm talking about loving there is extension methods (breaking traditional OO paradigms) and more importantly Lambdas. Which stop anonymous methods looking fugly.

    http://en.wikipedia.org/wiki/Compari...pression_trees

    nope, no support for those.

    x => x.BbgCode

    is beatuful way of letting a simple extension method know which property of the generic type, you want to get at.
    throw new ArgumentException (String, String, Exception)

  4. #4
    Theoretical Element Spud1's Avatar
    Join Date
    Jul 2003
    Location
    North West
    Posts
    7,508
    Thanks
    336
    Thanked
    320 times in 255 posts
    • Spud1's system
      • Motherboard:
      • Gigabyte Aorus Master
      • CPU:
      • 9900k
      • Memory:
      • 16GB GSkill Trident Z
      • Storage:
      • Lots.
      • Graphics card(s):
      • RTX3090
      • PSU:
      • 750w
      • Case:
      • BeQuiet Dark Base Pro rev.2
      • Operating System:
      • Windows 10
      • Monitor(s):
      • Asus PG35VQ
      • Internet:
      • 910/100mb Fibre

    Re: How do people still program C++/Java without crying?

    People stick to the old fashioned ways for a few reasons I think..largely its because theres this belief in the industry that if you want to program, you *need* to learn C++ first. Thats the general opinion I have come across anyway outside of the universities. Its out of date and a pain to work with, but the tradition is there and its going to take a lot to break it. People are still writing new apps using MFC for crying out loud! Madness I tell you.

    Java is (from what I can tell) seen as a good way into OO in education, which probably explains its proliferation..it is the first OO language I as introduced to, and it did me no favours whatsoever. I failed to get most of the actual concepts by learning that language, and it wasn't until I looked at C# a year later that everything actually clicked into place. Many people do stick with Java though and therefore take it into their professional life after university..and we're starting to see the effect of that.

    I guess another big reason is that lots of the newer languages are quite high level, and there is this belief that relatively high level languages (like C#, python) are not very efficient..when this clearly is not the case. Like any language it comes down the to compiler and how you structure your code. Things like Lambda expressons really help to speed things up here, making your code tighter, more efficient and easier to read.

    C, C++ and Java all have their uses in certain applications, but in reality 9/10 times there is a better choice. We have stuck with .net/C# for all our applications that we produce as a company, and are trying to keep up to date with the latest advancements. All our current projects are based on .NET 3 using WPF for the interface side of things, and although our backend is still .NET 2.0 at the moment we're slowly rewriting things like the DALs to utilise LinQ properly. I'm sure that one day the use of more modern languages will filter through to the larger organisations, but its going to take time.

    on the note of playing with new languages..this is more just for fun but i've been playing with LOLCODE too..and it actually makes a surprising amount of sense lol. Clearly it has no future as a serious language, but its great fun to write little apps with it kthxbye

  5. #5
    Registered User
    Join Date
    Sep 2008
    Posts
    7
    Thanks
    0
    Thanked
    0 times in 0 posts
    • jmc41's system
      • Motherboard:
      • nf4 lanparty
      • CPU:
      • 4200+
      • Memory:
      • 2gb ddr 3200 cas3
      • Storage:
      • 2x320gb T166 RAID1
      • Graphics card(s):
      • 7600GS
      • PSU:
      • Seasonic M12-500
      • Operating System:
      • XP
      • Monitor(s):
      • Neovo E-19, E-17
      • Internet:
      • ADSL

    Re: How do people still program C++/Java without crying?

    Unfortunately most Uni's concentrate on Java firstly, with maybe some other obscure languages (Haskell, Prolog, etc...) and very little stuff that'll be useful in the real world; unless you are going into a mathematical or teaching field which are the only places I can see them being used.

    By the time they catch up with the latest languages, we'll all have moved on again.

  6. #6
    Senior Member manwithnoname's Avatar
    Join Date
    Dec 2005
    Posts
    1,050
    Thanks
    17
    Thanked
    26 times in 25 posts

    Re: How do people still program C++/Java without crying?

    How do people still program C++/Java without crying? - personally, with C++, it was getting paid.

  7. #7
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,026 times in 677 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: How do people still program C++/Java without crying?

    the big question is though, why do people develop new software using "bad" languages? i know i avoid writing in things like c because i'd rather spend my time on the actual task at hand, not on fighting the language to make it do what i want or expect

    and having been on one of those java-heavy degrees, i know i wouldn't pick it as a language if i had the option of c#

  8. #8
    HEXUS webmaster Steve's Avatar
    Join Date
    Nov 2003
    Posts
    14,283
    Thanks
    293
    Thanked
    841 times in 476 posts

    Re: How do people still program C++/Java without crying?

    At Bristol Uni in the first year they teach CS students C, Verilog, Java, Haskell... I think that's it.

    They start with C because it tries to impart upon the students the knowledge of how a programming language actually does stuff to a computer.

    That can generally lead to two types of people - those who, as they're exposed to higher level languages, are uneasy about them; and those who are grateful for the ease that the HLL brings.

    But allow me to put a CSE spin on things. We get down to the hardware level. It's a case of write in C, or write the compiler backend so you can use what you want... and so see doesn't make me cry.

    I guess my point is - while I don't cry when using C, I sure as hell wouldn't use it if I was doing something high level.
    PHP Code:
    $s = new signature();
    $s->sarcasm()->intellect()->font('Courier New')->display(); 

  9. #9
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,026 times in 677 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: How do people still program C++/Java without crying?

    there are two ways to try & teach CS - bottom-up (starting with 'nasty' concepts like needing to manually use malloc, and eventually ending up in floaty object land) or top-down (starting with nice easy class libraries that let you teach algorithm concepts etc without caring about the fine detail, and ending up stripping away all you know as you move closer down the chain towards c or assembly)

    personally, these days, i think a top-down approach is more valuable, because if anything, it's easier to get people engaged - bottom-up is much harder to understand from the outset, which can exclude people who take a little longer to get the concepts. by starting with the high-level stuff, illogically, it makes it easier to teach CS fundamentals like list sorting or whatnot than a "fundamental" language where you need to teach people a LOT of hard-to-stomach crap before they can be productive

  10. #10
    Senior Member
    Join Date
    Jul 2008
    Location
    Rotterdam
    Posts
    229
    Thanks
    8
    Thanked
    8 times in 8 posts
    • NovaSphere's system
      • Motherboard:
      • Asus P5Q Pro
      • CPU:
      • Intel Core 2 Duo E8400 @ 3.0Ghz
      • Memory:
      • Corsair 2x2Gb PC2-6400 @ 4-4-4-12
      • Storage:
      • Western Digital 640Gb
      • Graphics card(s):
      • Asus ENGTX260 896Mb
      • PSU:
      • Corsair HX520W
      • Case:
      • Antec Three Hundred
      • Operating System:
      • Windows 7 64-bit
      • Monitor(s):
      • Samsung 2043BW

    Re: How do people still program C++/Java without crying?

    God, it's like I'm trying to read Chinese...

    I praise you for having the time and willingness to do all such stuff!

    (As for your topic, I never got what's with all this freaky signs and all, couldn't they have made it like, shorter and easier xD?)

  11. #11
    HEXUS webmaster Steve's Avatar
    Join Date
    Nov 2003
    Posts
    14,283
    Thanks
    293
    Thanked
    841 times in 476 posts

    Re: How do people still program C++/Java without crying?

    See I disagree with you hex.

    I learned a couple of languages (not very well) prior to Uni, and was grateful for being taught bottom-up.

    I guess it depends what you're trying to achieve. For straight CS, perhaps it is a better idea to go top-down.
    PHP Code:
    $s = new signature();
    $s->sarcasm()->intellect()->font('Courier New')->display(); 

  12. #12
    Senior Member
    Join Date
    Jun 2006
    Posts
    340
    Thanks
    22
    Thanked
    14 times in 14 posts

    Re: How do people still program C++/Java without crying?

    Last time I used C#, the thing I noticed most was how similar it was to Java, to the point of being near-identical as far as I could tell - can I ask you guys which features you find useful in C#, which Java lacks?

  13. #13
    Senile Member
    Join Date
    Dec 2003
    Posts
    442
    Thanks
    3
    Thanked
    0 times in 0 posts

    Re: How do people still program C++/Java without crying?

    Java seems fine to me. I think mostly the problem is with bad coders rather than bad languages.

    Many people never really "get" a language (or OO) and rail at it instead of realising where the problem really lies :-)

  14. #14
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,168
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts

    Re: How do people still program C++/Java without crying?

    Quote Originally Posted by Steve View Post
    See I disagree with you hex.

    I learned a couple of languages (not very well) prior to Uni, and was grateful for being taught bottom-up.

    I guess it depends what you're trying to achieve. For straight CS, perhaps it is a better idea to go top-down.
    I think this really depends. If your doing straight CS, do you really need to know 'how' it works? If the answer is yes (and i think it damn well should be) then starting with flowcharts and the like, looking at the structure of the older simpler CPUs or RISC ones.

    BUT, while i'm not disputing there is a time and a place for C/C++ even the best microkernel would still need some un-managed code, and i don't think its right to push this down to the CPU microcode.

    The thing is, far too many unis and this is equally applied to york/icl/oxbridge focus on actual languages and paradigms.

    Yes writing a simple compiler is a good idea, and the BCS are right to demand it for accreditation but, its more important that people learn lots of languages, and the good features from each.

    When you know how these langauges have to be compiled/parsed it really does explain them, and its very very easy to understand them. In .Net i'd say that once you understand partial classes from anonymous methods, then lambda's are obvious. Its necessery to understand such things so that you would understand what happens if you have a litteral referencing issue such as:

    Code:
    foreach (var x in enumarableObjects){
    delegatesToBeLaterDispatched.Add(delegate {// something that uses a ValueType from x, like a DateTime});
    }
    foreach (var x in delegatesToBeLaterDispatched)
        ThreadPool.QueueUserWorkItem(x);
    If people don't have a firm working grasp, they won't understand why something like that wouldn't work as expected.

    Quote Originally Posted by RedPutty View Post
    Java seems fine to me. I think mostly the problem is with bad coders rather than bad languages.

    Many people never really "get" a language (or OO) and rail at it instead of realising where the problem really lies :-)
    Quote Originally Posted by Templar87 View Post
    Last time I used C#, the thing I noticed most was how similar it was to Java, to the point of being near-identical as far as I could tell - can I ask you guys which features you find useful in C#, which Java lacks?
    Please see my first two posts in this thread.

    Try and do that in Java (or even C#1.0, rather than 3.0/5 like my example in the first post).

    Simply you can't without been a lot more verbose, which is bad.
    throw new ArgumentException (String, String, Exception)

  15. #15
    HEXUS webmaster Steve's Avatar
    Join Date
    Nov 2003
    Posts
    14,283
    Thanks
    293
    Thanked
    841 times in 476 posts

    Re: How do people still program C++/Java without crying?

    Interestingly, at Bristol, they never touch on .net. I guess because the CS department is a Linux shop, and doesn't want to touch mono.

    As such, I don't have a clue what that code example is on about

    The one good thing I would say is that they do throw a lot of languages at the students, and they keep doing so throughout the CS degree... but never anything .net-ish.
    PHP Code:
    $s = new signature();
    $s->sarcasm()->intellect()->font('Courier New')->display(); 

  16. #16
    Seething Cauldron of Hatred TheAnimus's Avatar
    Join Date
    Aug 2005
    Posts
    17,168
    Thanks
    803
    Thanked
    2,152 times in 1,408 posts

    Re: How do people still program C++/Java without crying?

    yes i never did any .Net at uni, hardly un-usual that, but i was also only doing half CS, half Cybernetics.

    (but i'd done some .Net before uni, and didn't really like it much, version 1.0 wasn't all that, and i simply thought i'll stick with java)
    throw new ArgumentException (String, String, Exception)

Page 1 of 3 123 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. My inane rant about internet spades
    By acrobat in forum General Discussion
    Replies: 39
    Last Post: 10-11-2013, 07:30 PM
  2. please urgent help needed with c++ program
    By haelly in forum Welcome to HEXUS!
    Replies: 2
    Last Post: 19-12-2007, 11:02 PM
  3. Reguarding Nvidia's 8800GTX, and my fury.
    By acrobat in forum PC Hardware and Components
    Replies: 49
    Last Post: 04-10-2007, 03:24 AM
  4. Replies: 0
    Last Post: 20-08-2007, 12:13 PM
  5. What to say to a telemarketer
    By kickstart 1 in forum General Discussion
    Replies: 76
    Last Post: 25-06-2007, 01:00 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •