Thread: Is it not learning C++ shooting myself in the foot?

  1. #16
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445
    Quote Originally Posted by Malcolm McLean View Post
    the vast majority of programs can be written in C as easily as C++.
    I strongly disagree. C, while being a "simpler" language, is much more verbose, and most things that happen automatically in C++ must be done manually in C. saying that an equivalent C program can be written "as easily as C++" is just simply incorrect.
    What can this strange device be?
    When I touch it, it gives forth a sound
    It's got wires that vibrate and give music
    What can this thing be that I found?

  2. #17
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    Another C versus C++ thread. Great, just great.

    I'm out.

  3. #18
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Nominal, my response to that post can, honestly, only : O_o

    Lol wut?

  4. #19
    Registered User
    Join Date
    Jun 2011
    Posts
    4,513
    @MutantJohn: About once a year or so, a "C vs C++" debate breaks out on these boards. Some people argue rationally, others passionately. Emotions can run high during these debates.

    Those active in the discussion typically fall into one of three categories:

    1. C is better than C++ because [insert arguments here]
    2. C++ is better than C because [insert arguments here]
    3. Use the right tool for the right job

  5. #20
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Lol omg.

    If I had to comment on one of the things I really like in C++ is the use of namespaces. It's pretty nice because I like how it organizes variables.

    Aside from that, that's pretty funny lol.

  6. #21
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    If you're trying to get into the world of numerical computation, I suggest learning Fortran 77 and 90/95 as well.

  7. #22
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by MutantJohn View Post
    So, I know the following then: Java, IDL, C, C++, CUDA and I mostly want to stick to scientific computing.
    By IDL, I assume you mean Interactive Data Language (technically a derivative of Fortran) rather than Interface Description Language.

    Quote Originally Posted by MutantJohn View Post
    And actually, you guys, what's the best way for a BS in physics to be hired as a programmer in the first place? What can I do to convince a company that I am just as apt if not even moreso than a CS person?
    Probably the best way is to get practical demonstrable experience as a programmer.

    I've known a lot of physicists who write code. Most of them don't care about programming. Most of those who do severely over-estimate their ability as programmers. You might therefore need to be prepared for scepticism or chortling at your claim about being as apt a programmer, or more so, than a CS person (or someone else with a relevant background). Then again, many CS graduates and many programmers over-estimate their abilities as programmers. Academic snobbery remains alive and well.

    Quote Originally Posted by MutantJohn View Post
    The thing is, from what I've found, upper div CS is more about math than it is syntax of language.
    Yes, advanced computer science includes a lot of mathematics. However, one key aspect of advanced mathematics is that it is a language (syntax, grammar, etc) for describing abstractions. And advanced computer science is about describing and managing abstractions.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  8. #23
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    You're right, grumpy. My peers are awful.

    Um... I don't know how much you know about meshing or the techniques but what if I told you that I could create a successful Delaunay tree which is used as the base of generating a Voronoi tessellation of space? I'm not trying to use jargon, I'm trying to eloquently and curtly describe my experience in one sentence. If you are unfamiliar with the terminology then you are just like every recruiter I've spoken too, even about meshing jobs. Which is sad. I spoke to one recruiter who literally didn't know the difference between C and C++ and it was also for a meshing job.

    What if I showed you this code and you saw that it worked, my tetrahedrons don't collide and the repairs happen as is needed without destroying the integrity of the search history.

    Is that demonstrated enough? I'm not trying to be hostile in how I'm asking.

    Making this mesh is really hard and it's tougher doing it alone and I only have an idea on how to handle repairs in the tree but I'm confident it'll work. If companies wouldn't take this as valid experience then I would be at a loss. So I'm curious, if a 23 year old BS in physics came up to you, told you he made a Voronoi tessellation code in C++, would you be intrigued? Would a company see that and raise an eyebrow?

    I've googled this enough to know that what I'm doing is technically graduate level CS. I really wish I had a professor to help me with this but I don't. The good news is, I'm really good at geometry now.

    But you're right, I can sense companies don't believe me. I feel like they read my cover letters and go, "No, you just read the wiki on it, you little troll" when in all reality I'm crying because this is so hard. But I love it even though I'm terrified of it. But then I think, I wouldn't be paid to solve the easy problems and even though I'm scared I can't back down. I'm starting to grow a backbone and repairing this tree is the biggest challenge that I have literally ever faced in my career as an unemployed at home programmer. But I think I got it. I think I got this.

    And you're right, I am using the Interactive Data Language. Good guess.

  9. #24
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    Quote Originally Posted by MutantJohn View Post
    Lol wut?
    Sometimes discussions degrade into garbage. I was really hoping this thread was not one, or I wouldn't have written the post #9.

    Quote Originally Posted by grumpy View Post
    Probably the best way is to get practical demonstrable experience as a programmer.
    I agree.

    Quote Originally Posted by MutantJohn View Post
    I can sense companies don't believe me.
    Because almost all current organizations are limited to short term objectives, they are not interested in what your value to the organization might be in say a year (except for worrying about what kind of liability you might become if it didn't work out).

    Employers are not interested in what you can do in general, either. They are only interested in whether you can do work they need done, or that generates profits; and whether you can do it more efficiently (faster, cheaper) than the alternatives.

    In many cases the interviewers don't even know what the work is that needs to be done, which means that "celebrities" and "people persons" are much more employable than experts. The prevalence of short term planning, fragmentation of careers, and the poor quality of management practices in general, has basically lead to current employment becoming a game.

    It is a game where your technical skills are only a minor asset.

    Make no mistake: I value knowledge and learning much more than I value any amount of money or financial security; it is a decision I've personally made a decade ago. I'm not trying to squash your dreams, I'm trying to give you realistic advice.

    Since I do believe I am one of those Grumpy was thinking about when he said some people over-estimate their abilities, I'll just say I'm very confident in mine. I do base my beliefs on things I've done and problems I've solved, though.

    Yet, in my own case, I consider myself unemployable, at least in the traditional sense. I just don't fit in the short-term economy well.

    I do have two options left: either finding a computational physics research topic I can get funding for, or finding a large company that requires a multiple-domain problem-solving specialist that fits my skill set better than anyone else. If neither of those pans out in a year or two, I guess I'll have to adapt.

    Do not despair. Plan your moves, and adapt when you have to. I'm sure you'll do fine.

  10. #25
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    So wait, why is the job market so dumb?

    I will call it dumb because with the way you described it, it can't possibly be smart.

    And if someone like you, Nominal, is unemployable then I am even more unemployable...

    That's... disheartening.

    Should I even finish this project then? I love it and I'd love to finish it but if it won't get me a job, then it's pointless. I only started coding it because I thought if I demonstrated my skills with a difficult project that has several applications in various areas of computer science, I would get a job. That an employer would see my resume and ask my portfolio and see that I'm able to handle complex geometries and code, difficult algorithms and structures.

    But a company won't even consider how much I would grow in a year?

    Why are they like that? The short-term economy seems like an awful idea and we're too smart to be dismissed! And by 'we', I mean the physicists who can actually program.

    And even if I was a BS in CS, I'd be used like a tool and then tossed away at the drop of a hat. That's not security if I'm only supposed to come in, do my work and then be replaced like I'm some sort of machine.

    So the people who get a BS in CS just basically get used and the people who get a BS in physics work at a grocery store.

    As a 23 year old, that's really sad. Wow.

    Everything I ever learned, studied or endeavoured myself to do is fundamentally meaningless. I'll never use my math, physics or programming skills...

    *** this, I'm gonna be a butcher.

  11. #26
    Ticked and off
    Join Date
    Oct 2011
    Location
    La-la land
    Posts
    1,728
    Quote Originally Posted by MutantJohn View Post
    So wait, why is the job market so dumb?
    Socioeconomics? Politics? Human nature?

    Quote Originally Posted by MutantJohn View Post
    Should I even finish this project then? I love it and I'd love to finish it but if it won't get me a job, then it's pointless.
    You need a plan.

    Find people who have hired people to jobs you'd like to try, and find out what they looked for. (Usually that means ignoring what they say they did, because most people are not that rational; better look at who got picked and why.)

    Find out how to make a company want to hire you. Show why it would be smart business for them to hire you. If it has to be a gamble (say if you don't have much practical experience yet), show that what you bring to the organization greatly outweigh any possible risks picking you might have.

    Be nimble. You're young, and you can find out what the world is like in different places. Remember that organizations are not human: they are not alive, and they have no feelings. Loyalty only exists in agreements and between living beings. Don't stay somewhere just because you're already there, and you feel you can make a difference. Make a plan, and execute it.

    Quote Originally Posted by MutantJohn View Post
    I only started coding it because I thought if I demonstrated my skills with a difficult project that has several applications in various areas of computer science, I would get a job.
    Look at it on the other side, as if you were a business owner or a manager. Why would you give someone a job just because they're good at something?

    You need to show your value, in a way that even the recruiters can see.

    I recommend against exaggeration (and definitely against lying), but planning ahead and exploiting the interviewers weaknesses is perfectly OK in my book. Treat it as a game, if it makes it easier.

    Quote Originally Posted by MutantJohn View Post
    The short-term economy seems like an awful idea
    Yup. And looking at the world, it's not working too well either.

    Quote Originally Posted by MutantJohn View Post
    Everything I ever learned, studied or endeavoured myself to do is fundamentally meaningless. I'll never use my math, physics or programming skills...
    Well, if you do the math, and calculate how much you'll actually earn during your career, it just might be better to be a butcher (smaller student loans, in particular). (I think plumbers make more money than PhD's over their careers.)

    Of course, if money or financial security is what you want, you have to go into finance and/or commerce. You don't get rich (or financially secure) by working; you get rich by owning and controlling stuff. That's just how this society works.

    If you wish to apply your math, physics, and programming skills, and get a living out of it, you just have to find someone who can make money out of your skills, then convince you are a better bet than anyone else.



    To be honest, this does seem quite ridiculous, a self-confessed "unemployable" person giving advice to someone just at the start of their career.

    Perhaps I should have stayed out of this thread, and let those who have successfully executed a plan similar to yours advise you.

  12. #27
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    "Employers are not interested in what you can do in general, either. They are only interested in whether you can do work they need done, or that generates profits; and whether you can do it more efficiently (faster, cheaper) than the alternatives."

    Pretty much sums it all up. Based on what has been said, it's obvious the OP is trying to get past getting a masters or a Ph.D for a job that clearly demands it; good luck with that.

  13. #28
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    Lol thank you, Nominal. That was a very helpful post and you have indeed talked me off of a ledge.

    I've decided, I'm not going to get a programming job... yet. I will not abandon this project. I will, however, shift my priorities to just getting a job because I want out of my parents' house. I figure, if I keep coding on the side, I'll eventually break through and you're also right, I need to find someone who can recognize the value in a physicist/programmer. The thing is, it might just take longer than I'd like which is fine because I'm still young enough, I have this time to burn and search and grow.

    Plus, I just really, really wanna live with my girlfriend again.

    So, I am not giving up! I will make this Voronoi tessellation, even if it kills me. And I don't think I can afford butcher's school. So it looks like data entry for me which is cool. I can code on the side and no one'll be the wiser.

    Also, Epy, it's on, son! It's on like Donkey Kong! It's on like... It's on like a HoN vs. DotA 2 debate.

    All silliness aside, I'm actually quite far on the project. I've already established a tetrahedral triangulation routine that works and switching from using a long double to a double data type actually reduced the runtime of my triangulation by like a factor of 4 (from 3.5 seconds to like .86 in making the same 1514 tetrahedrons).

    Also, the way to use a Delaunay tree is, have multiple parents to the same set of children! You use the tree for a search history but even though old tetrahedrons are invalid, the volume they span, however, is not! It's still valid! Volume is conserved for every insertion and repair so what you do is, have multiple leaves point to the same node which then points to the new children.

    The way to make sure the search is still clean is to use an "occupied" field per leaf. For example, let's say we perform a 2-to-3 flip. You may be wondering, 2 tetrahedrons to 3? That can't conserve volume! Oh wait, but they do and it's all kinds of sexy.

    Let's say we have two tetrahedrons, abcx and abcy. The line connecting xy intersects the triangle abc in its interior so we have met all the requirements for restoring Delaunayhood and I actually wrote code that does this but doesn't integrate back into the tree, it'll just produce 3 Delaunay tetrahedrons.

    So basically, the new 3 tetrahedrons are abxy, acxy and bcxy. Uh, son, uh!

    So how do we put this into the tree? Simple. Take the leaves abcx and abcy (every tetrahedron in the mesh is a leaf) and have them point to a parent node. This parent node then points to the leaves abxy, acxy and bcxy. So, when I search again, I can actually locate the repaired tetrahedrons just by using volume spanning. Simple enough.

    But if you're really, really clever, you'll consider the search finding the same leaves twice as what if the point is located on the shared face between our original two tetrahedra, abcx and abcy? Simple, simple. Occupied leaves field. When traversing the tree, it'll find abcx and examine where the point would be in the 3 children but it keeps searching and finds it's also in abcy so it brings it back those same 3 children. Instead of inserting the same point twice, I do all my searching first, gather up the leaves to be fractured and then if the same leaf is found twice, I don't fracture it twice. I just discard the second find.

    And that, ladies and gentleman, is how you code a Delaunay tree. Or at least, that should totally work.

    Yeah, tell me I need a Master's to know? Pfft, I'll teach this to a Master's student and they'll be all like, "Whoa bro, you're, like, super smart, aren't you?" and I'd be all like, "No, I am only a man."

    XD

    For proof of volume conservation, I tested the two tetrahedrons with an online calculator (0, 0, 0), (7, 0, 0), (0, 7, 0) and (2, 2, +/- 2). The combined volumes were roughly 32.664.

    My three children were simply
    Code:
    {(0, 0, 0), (7, 0, 0), (2, 2, +/- 2)}, {(0, 0, 0), (0, 7, 0), (2, 2, +/- 2)}, and {(7, 0, 0), (0, 7, 0), (2, 2, +/- 2)}
    whose total volume spans roughly 32.668. This is due to rounding errors but hey, it largely conserves the volume enough for accurate searches because as at least I know, a real double extends more than just 3 decimal places.

    So Epy, do you dare to challenge me? I am the King of the Beasts and I lost myself today. Today was a strong moment of weakness that threatened to overtake me but I know my path now and I will not suffer such insolence. Now boy, if you see any flaws with my algorithm, I gotta figure out a way to actually put this abstraction into practice.

    Also, thank you again, Nominal, you're my hero. You're a very nice person and you really did help me through a pit today.

  14. #29
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by MutantJohn View Post
    Um... I don't know how much you know about meshing or the techniques but what if I told you that I could create a successful Delaunay tree which is used as the base of generating a Voronoi tessellation of space? I'm not trying to use jargon, I'm trying to eloquently and curtly describe my experience in one sentence. If you are unfamiliar with the terminology then you are just like every recruiter I've spoken too, even about meshing jobs. Which is sad. I spoke to one recruiter who literally didn't know the difference between C and C++ and it was also for a meshing job.
    I certainly don't claim expertise, but I came across Delaunay triangulations and Voronoi diagrams when doing some work involving terrain generation.

    One thing you've got to realise is that your work is quite specialised - you are using one technique for a particular purpose. Unfortunately, unless you know you are talking to a specialist who knows about such things, you need to be able to discuss what your work achieves in concise laymans terms. Recruiters rarely have specialised knowledge - if you're lucky a recruiter might recognise a few relevant keywords or topics, from a brief conversation with someone in the area they are recruiting for.

    Quote Originally Posted by MutantJohn View Post
    What if I showed you this code and you saw that it worked, my tetrahedrons don't collide and the repairs happen as is needed without destroying the integrity of the search history.
    I would look at it as a single example of code, written for one purpose. In other words, you would be a typical person who has done a little coding during study: with specialised but not necessarily general skills of problem solving.

    If this was an interview situation, I would attempt to gauge how you went about solving the problem, possibly ask "what if" type questions on variations of the problem you addressed, and probably describe another (unrelated) problem and ask you to describe how you would go about addressing it. It is your willingness, ability, and approach to solving problems you haven't seen before - but are potentially relevant to a job you're being interviewed for - that will determine if I employ you.

    Quote Originally Posted by MutantJohn View Post
    Is that demonstrated enough? I'm not trying to be hostile in how I'm asking.
    The short answer is that, no, you haven't demonstrated enough, unless you happen to have applied for a job that is directly related to work you've done before.

    The thing is, any employer will be interested in what value you offer them, how you will go about addressing problems relevant to the job they offer, and whether you will do so effectively under their employ. And you need to pitch your application accordingly. If you are seeking a specialised position doing similar work, then use the specialised language. If you are seeking work that will make use of your problem-solving ability rather than just your ability to solve a particular problem, then you need to describe your work to non-specialists. Including recruiters, if they are in the loop.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  15. #30
    Make Fortran great again
    Join Date
    Sep 2009
    Posts
    1,413
    You don't need a master's to know, you need a master's for the job. Almost all jobs I've seen concerning numerics require a master's if not a Ph.D. It really doesn't matter what you can do, cause people are stuck on degrees.

    I took a Ph.D level course on computational fluid dynamics during my junior year of my BS, think any employer cares? Nope.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Template Header Shot my foot
    By SevenThunders in forum C++ Programming
    Replies: 5
    Last Post: 03-17-2010, 11:54 PM
  2. Shot myself in the foot, but gcc provided the bullets!
    By Sebastiani in forum C++ Programming
    Replies: 9
    Last Post: 09-22-2009, 04:22 AM
  3. Foot Pedals
    By gvector1 in forum C# Programming
    Replies: 2
    Last Post: 06-25-2005, 02:00 PM
  4. 6' foot 3 womens
    By OneStiffRod in forum A Brief History of Cprogramming.com
    Replies: 19
    Last Post: 12-24-2002, 11:31 PM
  5. Shooting yourself
    By Theologian in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 08-24-2001, 05:09 AM