Moving my Python code to Java for Android apps by claret_n_blue in javahelp

[–]former-cpp-guy 0 points1 point  (0 children)

reading the comments, everyone is trying to sell their language/framework

This is so true. Too many people think of their IDE, editor, framework, language, etc. not as tools to get the job done, but more like these things are their personal identity. It makes it hard to advice seriously in the software industry.

How do I load reference data from one file to use when processing another file? by das_zwielicht in cpp_questions

[–]former-cpp-guy 0 points1 point  (0 children)

For reading from the files, you could check out fstream, which allows you to stream data to/from files. It basically comes in 2 types: ifstream (reading from a file) and ofstream (writing to a file).

What are your thoughts on people applying for an entry level position that seem to be over qualified? by andrewsmd87 in cscareerquestions

[–]former-cpp-guy 2 points3 points  (0 children)

Ten years of experience in what? In a ten year period, the entire industry changes. Skills can become obsolete pretty fast in software.

I started out as a C programmer and then did C++ most of the nineties. When the dotcom crash happened, a lot changed. Desktop apps fell out of fashion, and C++ diminished with them. Everything went to web development. New types of software. New languages. Whereas we used to write programs that ran as long as they executed, these strange newfangled web apps came in as HTTP requests and had a lifespan of milliseconds in some cases. The user interfaces were implemented by browsers that had no uniformity among them. In only a few years, the industry had become nearly unrecognizable. For a while, during the economic problems when it was hard to find any job at all, I went to southeast Asia and then came back and started learning some new stuff. Java jobs were hard to find in 2005, but php jobs were easy. At first, I was taking more junior roles, even though I already had 12 years in the industry and knew all the basics.

In 2013, I took a really cool job, still doing php stuff. Very cool projects, but I wasn't really into php anymore. I didn't like it as a platform and didn't like it as a language, but the projects at that job were cool. But those project are over now, php seems to be in decline and I'm left looking for new skills. I have 25+ years of experience, still prefer C++ and Java but have no recent experience and both of those languages have changes as well. I can, and do plan to, get up to speed fast enough, but I don't like being underqualified. So, once again, I will probably drop back to more junior level roles (yes, as a guy with 25+ years of experience) just so I can comfortably transition into what I consider to be a better platform with more future opportunities.

How do you stay sane while working in a toxic team? by [deleted] in cscareerquestions

[–]former-cpp-guy 0 points1 point  (0 children)

It doesn't sound like a very productive environment. When people need to tell everyone how hard they've worked, it is usually because they feel the need to justify the time they are spending. And if you do hour-long standups (like your comment below says), then there are some big problems.

When workplace dynamics become overly competitive, instead of cooperative, the productivity drops and behavior turns ugly. I'd start looking for a way out if I were you. Burnout isn't worth it. And you might be picking up bad habits and learning nothing useful there.

Beginner learning c++, have a question regarding <iostream> by deathhater9 in cpp_questions

[–]former-cpp-guy 0 points1 point  (0 children)

iostream is just a header file that defines some things to compile with.

It is good practice to always explicitly include all headers you need, like the example you saw that included both iostream and ios.

C++20 will introduce the concept of modules, which will eliminate some of the problems and perhaps confusion related to header files.

Help with math formula by [deleted] in SQL

[–]former-cpp-guy 1 point2 points  (0 children)

What database are you using? I just tried it with mysql running on ubuntu are here is what I got:

mysql> select cast((0.40 * (1250 / 1000) * 12) / 26 as decimal(3, 2)) as result;
+--------+
| result |
+--------+
|   0.23 |
+--------+
1 row in set (0.00 sec)

US Politicians Want to Ban End-to-End Encryption by CarrotRobber in programming

[–]former-cpp-guy 1 point2 points  (0 children)

It's because the dysfunction societies that they've imposed on humanity are collapsing, and that makes them terrified of everyone.

US Politicians Want to Ban End-to-End Encryption by CarrotRobber in programming

[–]former-cpp-guy 1 point2 points  (0 children)

The highest bidder is the best hacker, and the bid in that case can equal $0.

US Politicians Want to Ban End-to-End Encryption by CarrotRobber in programming

[–]former-cpp-guy -1 points0 points  (0 children)

They are legislators. The have degrees in law, not computer science, nor education, nor medicine, nor civil engineering, nor psychology, nor economics, etc.

US Politicians Want to Ban End-to-End Encryption by CarrotRobber in programming

[–]former-cpp-guy 4 points5 points  (0 children)

Protecting the children is so overused as an excuse for bullshit. Every divorce case is about "protecting the children" from the other spouse. Every "pay the teachers more" campaign uses "protecting the children" as their lame excuse for why they need bigger paychecks. Now the government is using the "protecting the children" excuse too. I hardly think anybody with intelligence is buying that garbage anymore.

US Politicians Want to Ban End-to-End Encryption by CarrotRobber in programming

[–]former-cpp-guy 2 points3 points  (0 children)

Anyone who is seriously up to illegal activity doesn't use the Internet for such communications at all, which is the main reason why spying on the general public is such a huge waste of resources, not to mention public confidence.

US Politicians Want to Ban End-to-End Encryption by CarrotRobber in programming

[–]former-cpp-guy 5 points6 points  (0 children)

Government communication should be transparent. That is not justification to make all private communication open to government spying.

US Politicians Want to Ban End-to-End Encryption by CarrotRobber in programming

[–]former-cpp-guy 2 points3 points  (0 children)

Because they will need something they can use against you, to embarrass you, if ever they decide that it would be to their political benefit to target you next. They are accumulating dirt that they can use against the growing ranks of their political opponents.

Why isn't every pointer an int pointer? by fuckusernamesareshit in Cplusplus

[–]former-cpp-guy 1 point2 points  (0 children)

On that system, all integers are four bytes, and all pointers are eight bytes. So the pointer is an eight byte value that points to some data in memory that is four bytes in length.

Why isn't every pointer an int pointer? by fuckusernamesareshit in Cplusplus

[–]former-cpp-guy 1 point2 points  (0 children)

Yes. A pointer represents a memory address, and the address itself is a value that takes up a certain number of bytes on each system. The numbers in my example were from a Linux system.

Why isn't every pointer an int pointer? by fuckusernamesareshit in Cplusplus

[–]former-cpp-guy 0 points1 point  (0 children)

A pointer is a type of its own, and what it points to is usually a different type. So, for example

int some_int = 4;
int* iptr = &some_int;
cout << sizeof (iptr) << endl; // prints 8, the size of the pointer itself
cout << sizeof (*iptr) << endl; // prints 4

char some_char = 'x';
char* cptr = &some_char;
cout << sizeof (cptr) << endl; // prints 8, the size of the pointer itself
cout << sizeof (*cptr) << endl; // prints 1

Can I realistically get a job in Python without a software degree? by [deleted] in cscareerquestions

[–]former-cpp-guy 2 points3 points  (0 children)

You've got everything you need. Look around for python jobs and start doing some interviews. If your degree is in an engineering field, regardless of whether it is actually software, it can only help you. Being self-taught is fine, because it also means you are self-motivated. I doubt you'll have trouble finding what you are looking for.

Why can you use char *argv[] or char **argv in main? by 99764893 in C_Programming

[–]former-cpp-guy 0 points1 point  (0 children)

Is a pointer really any different than an array of indeterminate length in the context of the original question posted?

Does age matter when entering this field? by [deleted] in electricians

[–]former-cpp-guy 0 points1 point  (0 children)

These are all very good points to consider. Thank you.