• Breaking News

    Saturday, February 8, 2020

    Somebody has going to be the a**hole that tells you the truth: learn programming

    Somebody has going to be the a**hole that tells you the truth: learn programming


    Somebody has going to be the a**hole that tells you the truth:

    Posted: 07 Feb 2020 07:54 AM PST

    I applaud self-paced learning. I love the fact that the smartest and best programmers I know impressively proved that a degree is not necessary in the field. And I cherish today's possibilities of free learning resources. But there is one fact about the human capability people seem to completely neglect: No! You cannot become a full-stack junior web developer earning 80k/year within two weeks!

    The amount of people on this sub asking for "How can I score this interview? I have been learning x for y weeks..." always put us in a predicament. Yes, we want to help. And yes, we want to motivate. But there is a terrible side to this:

    WE are not a protected profession. You can't call yourself a lawyer after reading the constitution but you can call yourself a developer after a YouTube video. The implications of that are manifold, but here are the worst parts:

    1. Capable, young developers have a very hard time finding a job because the recruiting process had to adapt to all the "posers" that apply to jobs they are not qualified for. Those little unrealistic tests in interviews? They are a direct result of having to filter out the weeds while having no other option of constructing unrealistic tasks that say little about the interviewees potential. They filter out the complete noobs securely, but also burn a lot of people that would otherwise deserve a chance.

    2. You destroy trust in the industry and income potential of your peers! If HR finds a resume claiming to be a sufficient React developer and asking for 40k/year the resume next to it asking for double doesn't look that enticing. It is a fact that most jobs go through several filtering layers before somebody with the knowledge to assess capabilities will look at resumes. More often than not, no such person exists at the hiring company and shiny portfolio pages copied from templates make it into the pile while capable devs are not considered. Once an unqualified dev makes it into a company, a certain price is set (let's take the example of 40k). What many people thinking that "learning on the job" will help them catch up don't understand is: the peers that will come in will now be in the same bracket. Your "mentor" will never join this company (and if he/she would, you'd be fired within weeks), as from the company's perspective that resource is too expensive now. I have seen many startups die like this.

    3. Globalization. Even "bad developers" need to feed themselves. But if the quality, speed and overall outcome cannot compete with a remote resource available for less than $10/hour, what kind of message do you think you project into the industry? A famous example is India. You will find (just like anywhere) good developers there. The best work for Google, Twitter etc. But India has over a billion people. So the percentage of "I don't know much but am confident enough to hack it" might be the same, but ultimately accounts for many, many more people in absolute numbers. And given the difference in cost of living, they can flush the international market with $5/hour offers. So think this through: local hiring has become very cost-intensive due to all the local "I graduated from a bootcamp last Monday"-devs. The interview process alone requires so much time and money, that you might as well hire multiple people oversees and hope for the best, since you have the same risk when hiring locally. So what you are effectively doing is endangering the complete field by trying to "sneak in" with actual developers.

    Conclusion for learners:

    As stated in the beginning - Learning how to code is a useful, almost magic experience. And being able to teach yourself abstract and complex concepts in order to facilitate digital tasks deserves the highest respect. And you might have a combination of pattern thinking, intelligence and learning capacity to be a sufficiently trained developer in a relatively short amount of time. But the general notion that people can become junior developers within weeks is a LIE. A lie all the bootcamps and online schools sell you in order to make money. Many of those systems (better not mention names here), are almost a pyramid scheme: the teachers are former students. They do not hold the knowledge to get a well-paid job in the field, but they can repeat what they have gone through. (Don't get me wrong, there are reputable online schools and bootcamps for the most part)

    Conclusion for devs:

    Just today I found myself answering a questing a question ala "how to get this job I am not qualified for" with (hopefully) helpful tips. But then I thought: I wouldn't want to work with this person. If a project relied on such a resource, I'd be doomed. My team would suffer. Countless hours in overtime would have to be considered. I decided not to post that comment, then. I didn't want to tell that person that I think he/she is not qualified. I want to help, I want to motivate. But I also realize that in the greater picture, I am not helping. I want to work with people that deserve it. People that are skilled and have worked hard to get there. Maybe fresh and young (in the sense of little industry experience, not age) - yes - but ultimately I will not pay you for teaching you something without getting the output my team needs. If that becomes the case, then you should pay me. How do you feel about this?

    submitted by /u/evaluating-you
    [link] [comments]

    Does anyone else feel like they're "cheating" because there's a ton of information that you'll just never be able to absorb and there are things that exist that make "being a programmer" so easy?

    Posted: 07 Feb 2020 05:54 PM PST

    A good example of this is the scene builder in java. I'm learning how to make GUIs with JavaFX, and it's fun and cool and interesting, but it feels weird to be learning how to create Java GUIs with a tool that is a GUI for making GUIs....

    Now of course you could say "if it bothers you so much then don't use the scene builder, you can code GUIs by hand", but that's not really the point.

    Or sometimes I'm learning how to do something in Java, and a video or a stack overflow answer says to do X thing, and I do X thing and it's perfect and works. But I don't know what X thing is or how it works. (Example. SimpleStringProperty. Video about GUIs says that you need to use SimpleStringProperties for TableView objects, but I don't know why. I'll definitely google it in the near future to understand it, but I think it's fair to say that everyone learning to code runs into these things and it's impossible to fully understand every nook and cranny of a language, and if you went off and googled for documentation for every new thing, it would take a long time to get things done).

    Or how some things are already "done for you". So many things in languages are already made to be nice and easy and all that, which is great obviously, but at the same time it feels like cheating to just be able to have these things done and packaged up with a bow already. Like, I'm supposed to be a programmer, I'm supposed to be creating things, but I'm just using what other (much more intelligent and creative) people have already designed, it feels weird, ya know?

    It's like I'm overwhelmed by knowing that I won't and can't understand the nuance of everything in programming

    submitted by /u/Missing_Back
    [link] [comments]

    Undefined local variable or method (Ruby)

    Posted: 07 Feb 2020 07:14 PM PST

    UPDATE: No idea what was happening but when I changed to another text editor everything worked fine. Seems like '(tentativa, limite_de_tentativas)' was not recognizing as variables with the text editor I was using, not sure.

    I just started learning to script with Ruby yesterday and I stumbled in an error which I couldn't figure out exactly what is going on. The error is: maior_ou_menor.rb:17:in 'pede_um_numero': undefined local variable or method 'tentativa' for main:Object (NameError)

    As you can see, the problem is that 'tentativa' (try) is returning as undefined local variable or method. I searched for typos and tried to fix the indentation without success, my script is in portuguese and if you need me to translate the variables to english give me a heads up and I'll edit it.

    Here's the function that is returning the undefined local variable.

    def pede_um_numero(tentativa, limite_de_tentativas) puts "Tentativa " + tentativa.to_s + " de " + limite_de_tentativas.to_s puts "Entre com um número" chute = gets puts "Será que acertou? Você chutou " + chute chute.to_i end da_boas_vindas numero_secreto = sorteia_numero_secreto limite_de_tentativas = 5 for tentativa in 1..limite_de_tentativas chute = pede_um_numero(tentativa, limite_de_tentativas) acertou = numero_secreto == chute 
    submitted by /u/KoderGRK
    [link] [comments]

    [C programming] I can't solve this problem with wrapping letter values from Z back to A.

    Posted: 07 Feb 2020 08:40 PM PST

    Im learning C and I got this assignment which is taking me days and all came down to this bit of code I can't figure out! AAAAA

    Context: I am to make a program where the user inputs a "key" value and some text. Then the program "cipher" the text adding the key value to each letter. It must keep the propper casing and don't affect non letter characters. All is ok until I have to wrap around values from Z back to A.

    Here is the piece of code where I do this for uppercase letters:

     int key = atoi(argv[1]); //converts key to integer string s = get_string("plaintext: "); //prompts for plaintext for (int i = 0; i < strlen(s);) { if (s[i] >= 'A' && s[i] <= 'Z') //iterates cipher on uppercase { s[i] = (s[i] + key); if (s[i] > 'Z') { s[i] = (s[i] % 'Z') + 'A' - 1 ; } i++; } ... 

    So I figured out if the letter is in the uppercase interval and after adding the key value it is not greater than 'Z' value (which is 90), it should be ok. If the new value is greater than 'Z', then we must extract the maximum possible 'Z' values from our new number (s[i]+key) and add the remainder to 'A' in order to simulate a wrap around from Z back to A.

    And this was working fine for low key values like 1 or 2 but when I tried greater values like 27, it breaks! When I used printf to try to debug, I got weird results for the modulo (s[i] % 'Z') like 117 % 90 = 7 instead of 27. wtf

    I feel very dumb right now because I tried figuring out this problem the whole day and couldn't. Finally decided to ask. Sorry Reddit.

    submitted by /u/SuperMassiveCookie
    [link] [comments]

    Confused about this module...

    Posted: 07 Feb 2020 05:36 PM PST

    So assuming "item" is a private member variable in the class, in an example line like this:

    void PlainBox::setItem(const ItemType& theItem) { item = theItem; } 

    we are passing 'theItem' as a reference into the function so as not to create a copy correct?

    But if we are setting it's value to the private member variable in the class, wouldn't we have to create a copy inside that class?

    submitted by /u/gtrman571
    [link] [comments]

    PSA: Having enough energy and getting enough sleep is important if you want to be better at programming

    Posted: 07 Feb 2020 06:06 AM PST

    I have been programming for a few years now, and with >8 hours of sleep my ability to program is amazing. I can learn new languages in a day, I can read the documentation of a library once and understand it immediately, and I know the solution to any problem I encounter.

    With <6 hours of sleep I just can't do it. I don't mean that in a literal sense, I still know the syntax, but I just can't think logically. I can't see a problem and turn it into an if-else statement or while/for loop in my head. I just stare at the screen for a while, write some lines, but can't see the bigger picture and give up.

    Sleep is required for your cognitive abilities to function at their fullest, so it is important not just for programming but for any mentally demanding task that you have a regular sleep rhythm.

    submitted by /u/IHatePteranodons
    [link] [comments]

    How to build language learning websites/apps?

    Posted: 07 Feb 2020 06:19 PM PST

    I know some basic web development concepts like html/css/bootstrap/jquery/python. I would like to put it to use by building a language learning app.

    Therefore, I would like to learn the state of the art i.e. programming languages and architectural solutions used in language learning websites/apps.

    It seems like they use quite similar things e.g. duolingo.com suggest a meaning system is quite similar to https://www.lingq.com/en/. I would particularly like to know how to build such applications including the best ways of sentence checking.

    Do they use python nlp or some other solutions/frameworks devoted to language learning apps? Do they make use of google translator or a similar system, or they have their way of doing things? I would love to learn how to build such apps.

    Your suggestions as well as resources / courses greatly appreciated. I do not even know what to look for to get going.

    submitted by /u/44voy44
    [link] [comments]

    I don’t know any programming languages. What should I learn?

    Posted: 07 Feb 2020 03:30 PM PST

    I know this question is asked thousand of times. But I would still like to explain my situation. I'm currently in high school and I want to do something that will benefit my future, so I thought learning a programming language couldn't hurt. What's the best programming language to learn to be of best benefit for my future? I don't really have anything specific I would like to do with programming.

    submitted by /u/wybg
    [link] [comments]

    I just made my first project in HTML, CSS and JavaScript!

    Posted: 07 Feb 2020 11:59 PM PST

    Its functional yet profoundly boring and ugly, but the JavaScript does what I wanted it to do! It eventually guesses any number you think of between 1 and 1000, it's terrible and I love it.

    submitted by /u/ghostwilliz
    [link] [comments]

    Needing a little bit of help putting context to "The Big 5" C++ classes concept!

    Posted: 07 Feb 2020 05:52 PM PST

    Hey everyone,

    I'm in my first full-fledged C++ course and my professor almost immediately threw The Big 5 at us. By the big 5, I mean the 5 essential methods of a class (at least, that's what I think): the copy constructor, the copy overloaded operator, the move constructor, the move overloaded operator, and the destructor.

    This is pretty tough stuff as he kind of just showed us the syntax of them all and told us to implement them. That's all fine and dandy I guess, although I don't quite understand what I'm typing (lots of references, consts, and pointers). What I'm looking for is a clear and concise reason for the existence of these things, like an ELI5. What exactly are they? When would I use them over the regular default and explicit constructors??

    I really do love to program and would hate for this one concept to slow me down so much.

    Thank you very much!

    submitted by /u/AztecComputer
    [link] [comments]

    Flutter or RN for a JS dev

    Posted: 07 Feb 2020 11:46 PM PST

    I am javascript developer for almost 8 months with experience in VueJS for building websites but then I realized that I want also to develop a mobile application to expand my knowledge. Here are two of my choices to build a mobile application:

    React Native - since I am a javascript developer I can easily use my existing JS skills and expand my knowledge in JS too.

    Flutter - I will have to learn Dart to build flutter application but it has a clean documentation unlike in react that's why I love this.

    What do you think should I use to develop a mobile application?

    P.S PWA is not an option right now

    submitted by /u/pereVush
    [link] [comments]

    Splitting multiple projects in branches

    Posted: 07 Feb 2020 11:45 PM PST

    As the title suggests I want to split multiple branches for different type of projects. In my case i want to split in two branches: api and spa. I was looking for some reference but none of them answered my question regarding to my needs. I'm using GitKraken as my Git GUI tool.

    Any suggestion how to do that?

    submitted by /u/lakislavko96
    [link] [comments]

    Outputting matching values from arrays in C

    Posted: 07 Feb 2020 07:50 PM PST

    "Assign numMatches with the number of elements in userValues that equal matchValue. userValues has NUM_VALS elements. Ex: If userValues is {2, 1, 2, 2} and matchValue is 2 , then numMatches should be 3"

    So I understand what it is asking as it's asking me to output the number of elements that contain matchValues in userValues as numMatches.

    The Zybooks code is:

    int main(void) {

    const int NUM_VALS = 4;

    int userValues[NUM_VALS];

    int i;

    int matchValue;

    int numMatches = -99; // Assign numMatches with 0 before your for loop

    scanf("%d", &matchValue);

    for (i = 0; i < NUM_VALS; i++) {

    scanf("%d", &(userValues[i]));

    }

    I assumed after using the scanf, I would put another for loop for i followed by an if statement like so:

    for ( i = 0; i < NUM_VALS; i++) {

    }

    if (matchValue == userValues[i]) {

    But I don't know if that's correct or where to go with it from there.

    submitted by /u/Jplague25
    [link] [comments]

    Any Beginner Python Programming Challenges?

    Posted: 07 Feb 2020 11:22 PM PST

    Just started learning python basics at my university. Things like print, and if else statements. Very basic stuff, but I'd like to become really good at these. Any cool websites that help improve these basic skills? Thanks!

    submitted by /u/AmphyHD
    [link] [comments]

    Need Help with Recursive Maze Solver (Python)

    Posted: 07 Feb 2020 11:20 PM PST

    Hey guys, Im currently working on a personal assigment where We had to solve a maze using recursion. I have my idea down and I believe it should work, however my issue is that as it goes through the maze, it is not placing more than 1 '*', or not just showing the correct path

    Any help would be appreciated, I've been stuck on this for awhile..

    EDITED - Fixed code format

    def recrus(self,row,col): row = int(self._start) col = int(self._start) mark = "*" pos = "*" print(row) if row > int(self._end_row) or col > int(self._end_col): return False if self._maze_values[row][col] in ['-','+','|', '*']: return False self._maze_values[row][col] = "*": if self.recrus(row+1,col) == True: self._maze_values[row][col] == "*" return True if self.recrus(row,col+1) == True: self._maze_values[row][col] == "*" return True if self.recrus(row-1,col) == True: self._maze_values[row][col] =="*" return True if self.recrus(row,col-1) == True: self._maze_values[row][col] == "*" return True self._maze_values[row][col] == " " return False output --------------------- |* | | | |-+-+-+ +-+-+ + + +-| | | | | | | | +-+-+ + +-+-+-+ + | | | | | | | |-+-+ + + + +-+ +-+-| | | | |-+ +-+-+-+-+-+ +-+ | | | | | --------------------- 
    submitted by /u/xErratic
    [link] [comments]

    The term "inclusively"

    Posted: 07 Feb 2020 11:20 PM PST

    If someone gave you a range of numbers with a minimum and a maximum value and said the value needed to be inclusively between them, do you consider the min and max values as part of the range or out of the range? I feel like using the term "inclusively" would mean to include the min and max, but my program below is producing an infinite loop because I'm assuming numbers less than min and greater than max are not being used for the tests.

    void verify(int min, int max) { int userIn; do { cin >> userIn; if (userIn < min || userIn > max) { throw RangeException(min, max, userIn); } } while (userIn >= min && userIn <= max); } 
    submitted by /u/TheMcDoubleT
    [link] [comments]

    To new beginnings, need sources.

    Posted: 07 Feb 2020 07:25 PM PST

    I began to develop interest in PYTHON, so started watching YouTube videos. Now, I'm trying to write a few scripts by myself. I wanted to know if there's a book for reference (to learn the basics), that'll help me with it. Also, internet is helping a lot but I want to know if going by a book is good so that I don't miss out on learning.

    submitted by /u/__jon__snow__
    [link] [comments]

    Is it bad I would rather code than hang out with my friends?

    Posted: 07 Feb 2020 07:22 PM PST

    I like my friends, but since discovering coding the past year and a half or so it's all I do. I switched my major to CS, stopped my extra-curriculars, and stopped socializing as much because I'm obsessed. I never knew I could love something so much. And it seems I can never learn enough--there are so many fascinating domains within CS. Not only do I enjoy constantly coding, I'm also increasing my skills and thus job prospects. My friends now call me antisocial, but I feel like it's what I have to do. Should I chill out? It's possible I'll regret not being social enough, but if it means I'll be a great programmer and have a great job, it should be worth it. I'd much prefer it over being too social and getting nowhere in life.

    update: I appreciate the feedback so far, but just want to clarify: I am routinely commented on my good social skills. I'm as non-awkward as a CS major gets and I thoroughly enjoy talking to professors, people in class, on my project teams, and people in general when I find them interesting. I just don't like spending my free time hanging with people when I could be coding, especially when said hanging necessitates alcohol and wasting tons of time. Maybe I just need more CS, academic friends.

    Regardless, if I keep up this antisocial behavior, I definitely could become socially inept (good points here all around).

    submitted by /u/lemacintosh
    [link] [comments]

    Changing the value from one function in another function

    Posted: 07 Feb 2020 04:50 PM PST

    Hi, I've written a small function to split a string in c++, the problem I am running into is that I change the value of my original string in that function, but it doesn't register when I exit the function and keeps it original value. code below: string split(string str) {

    int len = 10; string x1, x2; for (int i = 0; i < len; i++) x1.push_back(str[i]); for (int i = len; i < str.length(); i++) x2.push_back(str[i]); str = x2; return x1; } 
    submitted by /u/Ammar2301
    [link] [comments]

    Finding an average of a random range of random numbers

    Posted: 07 Feb 2020 10:35 PM PST

    Bear with me as this is my first time posting here and I may not correctly format

    Hello,

    I am taking a college class in C++ and I was given an assignment where I have to find the average of an inputted range of numbers using a function. It uses default values as well (3 for the amount of numbers, 0 for the minimum and 100 for the maximum) which I am not completely understanding, especially when you have to change them for the inputs.

    Here's the code I have:

    #include <iostream> #include <cstdlib> using namespace std; double findRandomAverage(int numbers = 3, int min = 1, int max = 100); //the function prototype with the default values int main() { srand(time(0)); //random seed int userNumbers = 3; //default values again int userMin = 1; int userMax = 100; double average; cout << "How many numbers?" << endl; //in case of different numbers than the defaults cin >> userNumbers; cout << "Minimum number?" << endl; cin >> userMin; cout << "Maximum number?" << endl; cin >> userMax; average = findRandomAverage(userNumbers, userMin, userMax); cout << "The average is " << average << endl; return 0; } double findRandomAverage(int numbers, int min, int max) { int total = 0; int number; double average; for (int i = 0; i < numbers; i++) { number =((rand() % max) + min); cout << number << endl; total = total + number; } average = static_cast<double>(total) / static_cast<double>(numbers); return average; } 

    One of the tests that the site I am submitting this on correctly returns the right value (61.3) when the seed is 10 and all of the values are the default values. But when the default values aren't used, the program outputs the wrong number.

    When the seed is 22 and the input is findRandomAverage(4, 10), the function returns 73.75 when it should return 47.25.

    I've been cracking at this for a good 4 hours and I have no idea where to go from here. I would really appreciate any help! Thanks!

    submitted by /u/quickfire2
    [link] [comments]

    [Homework Help] Time complexity of a recursive algorithm

    Posted: 07 Feb 2020 10:25 PM PST

    I've been working on this problem for a few days now and have been having issues with solving for the recurrence relation of the algorithm. I solved the pseudo-code bit no problem so that's not of the concern. However, it later asks me to solve for a time complexity recurrence equation and analyze it using Master's Theorem. I don't have issues actually using the theorem, I am currently just stuck finding a recurrence that fits the criteria for Masters.

    This is my current attempt at a recurrence relation, however, the conditions for n don't match the condition of the Master's theorem where they n is compared to b, which is 3/2 in my case. My reasoning thus far is that there are three recursive calls, each working with 2/3s of n, so with a little rearranging, aT(n/b) with a = 3, b = 3/2.

    Am I working in the right direction? If not, could I get some pointers? Thanks!

    (apologies if this is on the wrong subreddit! Figured it would fit since its part of my CS course)

    submitted by /u/8BitClimber
    [link] [comments]

    Am I “dockerizing” correctly?

    Posted: 07 Feb 2020 10:08 PM PST

    I've been a traditional bare metal developer for a long time and am just recently getting in to docker. And I love it. So easy, portable, can easily commit and spin up a new image, awesome. But I'm wondering if I'm doing it right...

    I primarily work with ruby/rails and I "dockerized" my rails app by starting with an Ubuntu image, installing ruby, rails, MySQL, etc. but every tutorial I look at starts with a docker file... is that just another way of setting up ruby on an Ubuntu image? Is what I did true "dockerization"

    submitted by /u/Bluebro11
    [link] [comments]

    Is it necessary to choose a CS specialization?

    Posted: 07 Feb 2020 10:03 PM PST

    I find a lot of the CS subdomains very interesting, especially security, software development, and machine learning. I imagine I would like many others, too, but just haven't sampled them enough. Must I choose one or is it feasible/common to build skills in multiple CS areas and sort of cycle through jobs when appealing? If not, could having the other domains as a hobby be a good compromise?

    submitted by /u/lemacintosh
    [link] [comments]

    Opening a .docx file with Turbo C

    Posted: 07 Feb 2020 10:00 PM PST

    basically i need to open and read a word file in Turbo C, but i cant find a way to do it, i changed the file extension to .rtf so it chas a 3 char extension for msdos to be able to open it, but when i open it, the file is just a bunch of random characters instead of showing what is in the file, this is my attemp to do it:

    #include <conio.h>

    #include <stdlib.h>

    #include <stdio.h>

    void main(void)

    {

    clrscr();

    FILE *pf;

    char l=' ';

    pf=fopen("prueba.rtf","rb");

    if(pf==NULL)

    {

    printf("el archivo no existe...");

    getch();

    exit(0);

    }

    while(l!=EOF)

    {

    printf("%c",l);

    l=fgetc(pf);

    }

    getch();

    fclose(pf);

    }

    In case someone knows what i can do, please tell me, i cant find any other way in my head rn.

    submitted by /u/WereWhusky
    [link] [comments]

    No comments:

    Post a Comment