• Breaking News

    Monday, March 29, 2021

    First year of Computer Science: Rough Start learn programming

    First year of Computer Science: Rough Start learn programming


    First year of Computer Science: Rough Start

    Posted: 28 Mar 2021 06:15 PM PDT

    I'm in my first year of a computer science degree ( focusing on cybersecurity) and im currently taking computer science 1. I really enjoy the class however I struggle a lot with thinking of the way algorithms work and I feel like most classmates are not struggling as much as me. I feel like I do hours and hours of research and I still have a hard time with homework, projects and quizzes and really stressing about the final exam in a couple weeks. I wanted the opinion of some people that may have been doing this for a while, is it common to have a rough start and is it likely to get better with this? I really enjoy what im learning but I'm just having a hard time starting off and wanted some opinions, thanks!

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

    Is Coding Bootcamp the Right Investment For me? Honest Opinions please.

    Posted: 28 Mar 2021 07:28 PM PDT

    Hi Reddit Community!

    I have been reading a lot of blog posts on coding boot camps and I have not been able to find the right piece that could impart me the necessary kind of wisdom at this point in my career.

    And I finally decided to take refuge in God's greatest creation (reddit) after Megan Fox from 2002-present.

    A few facts about my background:

    29 male in a mid-senior role making 120k (annual) in a sociology-related field (don't ask how i am making six figures doing sociology stuff - i got lucky. In any case, I'm kind of getting bored of my work and want to switch to tech. I have a few startup ideas that will need AI-related coding skills. And i think i am fairly good at picking up new skills at this point in my career.

    My risk appetite is medium. Meaning can i quit my job and take the red pill? yes. However, i will need to take money from ya'll as unemployment wages in about 6 months coz that's what my savings would dictate me to do. Yes, we s$ck at saving money.

    Coming back. Do i have any coding experience? yes. Why am i suddenly interested in it? I have a lot of ideas I want to try out, but more importantly, I want to switch fields and i am kind of late in the game. So i thought bootcamp would be a deep-dive at a faster rate than burning 100k for a master's program.

    I am hoping to receive some honest advice. Thank you so much!

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

    An alternative way to learn programming effectively

    Posted: 28 Mar 2021 07:07 AM PDT

    Due to the ongoing pandemic and the fact that IT is not that much affected by the whole situation, many people decide to learn programming and apply for some open remote positions. As someone who started pretty late (at 24 years old) and does not have that much professional experience (as for now, about a year full-time job) I still have a fresh perspective on what I did right and what I did wrong and would like to share my point of view on how to effectively learn programming.

    As many others, I have been in a tutorial trap for quite a long amount of time, spending much more time watching YouTube videos than writing code. You can't learn how to play tennis by watching tennis tutorials and you can't learn programming by watching programming tutorials. Nevertheless, at the very beginning programming might be a bit overwhelming and good tutorials are quite helpful, they also add that „human" factor to the learning process so that many enjoy the process a bit more. Just make sure you recognize the moment where you need to move on. If you understand the basics (datatypes, operators, conditional statements, loops etc.), you are ready to proceed to the next step.

    What should be the next step ? Well, 99% people will tell you: build your own things. I heard it many times during my CS studies. And generally speaking, this advice is right. But what you are most often not told is that you should try to build your own things within an already existing environment.

    If you are looking for your very first 40h job and you get it, there is a little chance someone tells you „hey, please design and program an app form scratch". You will most likely join a company which already has an established product and a few developers working on it. This means that your first „task" is to get familiar with the project and understand the code other people wrote, so that you can build things on top of it: fix bugs and add new features. You might need to be able to find a specific line of code which you need to edit in a big project consisting of thousands of files which is quite different from looking for a file in your small alarm clock app. You will need to learn how to reuse existing code and how to solve conflicts which appear after merging branches that come from other developers. These are all things that building your own stuff „from scratch" might not teach you at all.

    Ok, so what would I recommend to a beginner programmer ? Find an up-to-date (recent commits) popular open source project that reflects your interests. Clone it. Get familiar with the structure. Now, start with some editing. Start slow. If it is has a UI, try to change the text of a label or action which a button click executes. Add another label, add another button. When you start feeling comfortable, start adding new features within this project. Think about things that might make sense: maybe there is a table listing some songs and you can extend it by adding some detail views which appear after selecting a row and show information about an artist ? Maybe there is a Settings section which misses some useful options you might want to see ?
    Update your project regularly. Pull the commits, make your feature branch up to date with the recent changes. Finally, if you feel like you can contribute to a project - do it ! At the end, make a pull request. You will get a feedback and learn from it. And you will get familiar with the "real" programming.

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

    Am I ready to take on Pygame

    Posted: 28 Mar 2021 08:39 PM PDT

    I learned python from Cs Dojo on YT and I want to know if I am ready to program games/simple application using python, I don't know if that was the full course or not, Cs dojo python playlist felt kind of short and if anyone here watched his tutorial am I ready to build simple apps/games based off the knowledge from Cs dojo tutorial?

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

    Help Chosing Electives

    Posted: 28 Mar 2021 08:55 PM PDT

    Hello everyone, I have to take 2 courses from the following choices of electives that I am interested in. Please tell me which two from these would you choose if you were in this situation. 1) Computer Networks 2) Automata 3) Parallel and Distributed Computing 4) Artificial Intelligence

    Please don't explain what each course is about. I have researched about that. I just want to know what others would take.

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

    What programming language would yall suggest for a rhythm game?

    Posted: 28 Mar 2021 04:02 PM PDT

    Heya folks! I'm super new to programming, so I should probably focus on more basic stuff for now, but I've just been really wanting to program a rhythm game as of recent and if I could learn to do that I'd be ecstatic.
    The only current knowledge I know right now is the basics of python (through the use of renpy), but that's more for visual novels than rhythm games.
    The rhythm game I'm hoping to program is a lane based one, like DDR or FNF.
    Sorry if this question is dumb... I'm just thinking that an answer from experienced programmers would be better!

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

    Looking for a good beginner oriented Programing environment similar to, but more advanced than scratch

    Posted: 28 Mar 2021 05:44 PM PDT

    I'm looking for a programming environment that I can use for game development or other random projects/simulations while also using an actual programing language. After scratch(which is how I got introduced to programing) every class I take has put me into a console based environment & I'm looking for something with a more visual output. I've tried both unity and unreal engine but I feel really out of my depth & every tutorial I find seems to just show me how to do a specific thing in the environment & not how to just use it by myself. I was wondering if anyone knows a programing environment that is good for my situation.

    TL:DR I'm looking for a steppingstone between scratch, and more professional game development environments like unity and unreal engine.

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

    OOP WAT

    Posted: 28 Mar 2021 09:18 PM PDT

    Hello, I have been trying to learn object oriented programming on my own. I pretty much have covered all the basics. But, I have been stuck on learning OOP. A lot of the tutorials and explanations that I have seen came with a lot of verbiage and didn't really show it well in actual code. What are the best free resources to learn the 4 principles of OOP / higher level OOP in general (preferably in python)?

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

    How would you test the following API call?

    Posted: 28 Mar 2021 08:56 PM PDT

    Lets assume an API that does the following:

    1. Updates 2 database tables
    2. Returns a status of true or false based on if the tasks is successful

    I was thinking of doing an integration test to check for the returned status. However, should I also check if the 2 database tables are updated as well by pulling them out the database after the update during the test? Would this belong in an integration test or should I just stick to testing the status?

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

    Is getting a remote job in the US a realistic goal?

    Posted: 28 Mar 2021 09:33 PM PDT

    A little bit about myself:

    • 27 yo male;

    • I have a degree in civil engineering;

    • I'm not from the US, my English needs a lot of improvement and I'm working on that;

    • I work in a small startup as a junior front-end developer, started this month.

    I got into programming just a few months ago, I took CS50 and then moved on to The Odin Project. You may be wondering how I got a job with just a few months of studying, that was because I'm friends with one of the workers at the company, so it was just "cheating" the hiring process. I'm still learning and struggling a lot but enjoying it so far.

    My goal is to get a remote job as a web developer in the US or Canada, once I've gained enough experience, but I've heard that most of the companies over there require a degree in the IT field.

    I know I still have a long way ahead, but what are your thoughts about this? Would anyone here who works remotely from outside the US like to share their experience? Any advice is appreciated!

    Edit: grammar

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

    Getting null error when inputting a file

    Posted: 28 Mar 2021 10:40 PM PDT

    For some reason in my code down below I get a "Exception in thread "main" java.lang.NullPointerException" error. Down below is my code

    if(in.readLine().equals("DIR")){ //System.out.println("in here"); File file = new File("/ServerShared"); //System.out.println("file " + file); //System.out.println("in here"); File[] content = file.listFiles(); for(File current: content){ System.out.println(current); } } 

    and my directory structure is like this

    Src Sample ServerShared apple.txt banana.txt Client Controller FileThread Main Server 

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

    Hello all of you learning C++, let's talk about lambdas

    Posted: 28 Mar 2021 09:56 AM PDT

    One of the things I've noticed when looking at the questions/comments that are posted here as well as when I recently visited my old University is that lambdas seem to be an area that is often considered magic.

    When I say magic here, I mean that as in:

    I know how to use it, but I don't know how it works or exactly what it is.

    My aim with this post is to hopefully help you understand lambdas in C++ a bit better.

    I've made some assumptions that you already know a bit about lambdas, references and pointers. If you're reading this and feel lost at any point, let me know and I'll edit this to cover that too (or just answer as a reply if I feel like it might not fit into the post itself). There are no stupid questions.

    Using a struct in a lambda-like way

    If we have a lambda like this one:

    auto AddLambda = []( int X, int Y ){ return X + Y; }; int AddResult = AddLambda( 10, 4 ); // AddResult == 14 

    We could write that as our own struct/class that looks like this:

    struct SAddStruct { int operator()( int X, int Y ) { return X + Y; } }; SAddStruct Add; int AddResult = Add( 10, 4 ); // AddResult == 14 

    We simply overload the () operator (the function call operator) to do what we want it to do. Now we can use it exactly like we did with our lambda!

    The good news

    Here's the really good news. Our struct in the previous example is basically equivalent to our lambda.

    This is going to be a bit technical, but bear with me, I'll try to explain as we go along.

    Let's use our friend Compiler Explorer to have a look at what the assembly for the lambda example looks like. I'm using x64 msvc v19.latest in case you want to have a look at this example yourself.

    We're only really interested in one line:

    call <lambda_76e998ccba6e4d701d580fe921242341>::operator()(int,int)const 

    Okay, cool. Now let's see what that line looks like for our struct example:

    call int SAddStruct::operator()(int,int) 

    They look rather similar don't they? That's because they are. The lambda we created is really just a shorthand way of generating a type which has an overloaded function call operator that looks like how we defined our lambda.

    In our case, msvc named that type lambda_76e998ccba6e4d701d580fe921242341 while we named ours SAddStruct. This is why we store lambdas using auto, we can't know the type, only the signature of its function call operator. It's up to the build process to generate the type.

    So what about captures?

    Yes, right. You can capture data in lambdas like this:

    int X = 5; auto AddLambda = [X]( int Y ){ return X + Y; }; int AddResult = AddLambda( 10 ); // AddResult == 15 

    Some of you may have already guessed this, but this would be the equivalent of making our struct like this:

    struct SAddStruct { SAddStruct( int XVal ) : X( XVal ) { } int operator()( int Y ) { return X + Y; } private: int X; } int X = 5; SAddStruct Add( X ); int AddResult = Add( 10 ); // AddResult == 15 

    If you instead capture like this:

    int X = 5; auto AddLambda = [&X]( int Y ){ return X + Y; }; 

    That just means we'll have to change our struct to look like this:

    struct SAddStruct { SAddStruct( int& XRef ) : X( XRef ) { } int operator()( int Y ) // Unchanged private: int& X; } 

    But what about the [&] capture?

    So, at any point you write a lambda like:

    int X = 5; auto AddLambda = [&]( int Y ) { return X + Y; }; 

    All you're really saying is

    Capture all that I need as reference automatically.

    That means that this is the exact same as our previous example for a capture.

    If you're accessing a member or function from the type you create the lambda in, it will also capture the this pointer to the object. You're also capturing the this pointer obviously if you capture like so: [this].

    Be careful when capturing members or the pointer to the object since now that lambda is dependent on the life time of said object!

    Summary

    • Lambdas are just types generated at build time which implements the call operator as you defined the lambda.
    • You can now hopefully reason some more about what the size of any lambda type will be (what's the size of the equivalent struct?)
    • Don't be scared of using lambdas, they don't add much (if any) additional runtime overhead compared to your own types.

    I've simplified some things in this example, so I still definitely recommend doing some more reading about lambdas on your own time.

    Bonus

    If you have a lambda with no captures, it can be implicitly converted to a traditional function pointer:

    int(*AddFuncPtr)( int, int ) = []( int X, int Y ){ return X + Y; }; 

    This might come in handy at times.

    For more clarity however, I strongly recommend using the STL function type.

    #include <functional> std::function< int( int, int ) > F; F = []( int X, int Y ){ return X + Y; }; 

    std::function<> also allows being assigned lambdas that do have captures.

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

    How frustrating was practicing programming for you?

    Posted: 28 Mar 2021 12:40 PM PDT

    Hey there,

    I am currently learning Python and I am more motivated than ever to master this language and be comfortable coding in it.

    I know that it won't happen overnight.

    So far, I learned the basics including the intro, syntax, variables, data types, booleans, conditionals and loops.

    I am trying to put everything into practice which isn't bad but frustrating when I can't get things to work the way I want them to work.

    I like to try different things and see what works, but I fear to be too "slow" when I will actually code in the real world.

    I'm still a beginner. Any tips? Personal experience to share? Motivation?

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

    Binary to text conversion not working - URGENT

    Posted: 29 Mar 2021 12:46 AM PDT

    Any help would be appreciated

    I am trying to write a c program to convert a binary file to text. The format of the binary file is as follows: First there is an integer followed by a character that is either 'i' or 'd'. For example "5i". I am trying to read it but I am getting the following values:

    -5 -4 -3 -2 -1 0 1 2 3 4 

    My code is as follows:

    #include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <string.h> void BinaryToText(char *, char *); int main(int argc, char **argv){ BinaryToText(argv[1], argv[2]); } void BinaryToText(char *inputFile, char *outputFile) { //unsigned int num; // assuming 32 bit ints int i, len; FILE *finp = fopen(inputFile, "rb"); FILE *fout = fopen(outputFile, "w"); int key; char operation[1]; while ((fread(&key, sizeof(int), 1, finp) == 1)) { fread(&operation, sizeof(char), 1, finp); fprintf(fout, "%d\n", key); fprintf(fout, "%c\n", operation); } fclose(finp); fclose(fout); } 
    submitted by /u/abilityundefined
    [link] [comments]

    Didn't know what should I do in CS field later ?

    Posted: 29 Mar 2021 12:43 AM PDT

    I'm in my second year of college, CS. But I didn't find any particular field which

    I should peruse later. I also didn't know in which field i am interested. what should do?

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

    Is this an easy start?

    Posted: 29 Mar 2021 12:39 AM PDT

    I want to make a program that will read tweets from a particular twitter account and repost to another website. I am new to coding, what program can I use for this and is this more complex than I imagine it would be?

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

    I want to tutor people for free!

    Posted: 29 Mar 2021 12:37 AM PDT

    Hey, I am only 18 but I have been coding for half my life! I have coded professionally as a freelancer, and coded for a big insurance company. You can check out one of my projects here. I say this not to brag, but just to show I wouldn't totally waste your time. I am experienced mostly in JS(node), but I have passing experience in other languages. As for the reason I want to tutor people, there are three:

    1. I still want to improve and I think one of the best ways to improve is by teaching people!

    2. I want to learn how to better explain things to people and teach them.

    And, 3. I like to talk about programming, but none of my friends want to.

    So, if you are interest, just DM me

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

    Project organization.

    Posted: 29 Mar 2021 12:30 AM PDT

    How do you guys organize/plan out your projects before actually starting? Like I jump to it and begin, but as I make bigger and more complex things, I believe a bit of planning would help. Any tips?

    submitted by /u/Pretty-Ad-8533
    [link] [comments]

    Why is Python not used for professional software development?

    Posted: 29 Mar 2021 12:22 AM PDT

    I've been an enterprise software developer for decades. It has been only recently that Python has come into its own for what you call "professional" software development. Ten years ago Python was still very much an evolving language. Even today Python continues to evolve at a rapid pace. Much too rapid for enterprise development.

    Enterprises like things that don't change, at least not often. It's expensive to have to rebuild complex systems over and over when a platform language changes, and Python has changed rapidly over the past decade. This is why most enterprise, or what you might call "professional", software development is not using Python.

    For this reason, enterprises either refuse to use, and are abandoning other rapidly changing libraries like Angular for the UI and SPA's (single page applications). On the surface these technologies looked promising and worked well, but the rapid change of their versions left enterprises with expensive re-working and re-tooling of the UI and ripping out of entire frameworks when newer versions were introduced that were incompatible with earlier versions. Engineers had to re-learn all new code and libraries.

    Another aspect of this non-use is the fact that academia of often out of touch with the "real world" enterprise. While colleges and universities are "pushing" Python as the language of science and whatever, the fact is it's just not being widely used, not like Java, .Net, or even PHP and Node.js. Why academia pushes people into learning languages that are not widely used is a kind of arrogance on their part, but at the end of the day, people like to use what they know. Academia needs to learn what people in the enterprise are actually using and stop trying to push people into their fav religion.

    And this is kind of the point. Programming languages are a lot like religion, we use what we know and we don't like to change.

    A family member just earned her degree in data science. The college taught her to use Python almost exclusively. Guess what? Her enterprise job doesn't use Python and refuses to support it. Who is wrong here: Academia or the Enterprise academia is supposed to be preparing her for?

    At the end of the day, you need to learn what will make you money in the global economy. I have been asked to join business to rip out Python and replace it with PHP, something everyone is actually using. This is not to say that Python is a bad language, but for all of the hoopla being given it by academia, it's still not widely used and may never become widely used for decades, if ever.

    [Adapted from the Quora app]

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

    Getting a degree in CS?

    Posted: 29 Mar 2021 12:05 AM PDT

    I am a complete (2 months worth of experience) beginner in CS and would like to make a career out of it. My parents said they are ok with paying for my education, but I'm not sure if I would be wasting their money with so much online courses available. Is paying for a degree worth it? If so, are there any particular universities or programmes you'd recommend?

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

    What are the best way for a front end developer-web- to go from intermidiate to a proffetional?

    Posted: 28 Mar 2021 11:41 PM PDT

    I know some of you are gonna say learn react or vue or ... But i don't mean this but i more care about the pro tips and code organisation and organize the workflow. Also what is your best technology stack?

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

    Not getting any results even after trying everything, need help.

    Posted: 28 Mar 2021 11:41 PM PDT

    This is my first year in CSE engineering. I have been learning HTML, CSS and JS and now learning version control and React JS. I have been finding a freelance project or a internship and trying to join some good projects. I have applied in atleast 10 startups, via. Linkedin/Twitter/AngelList but still not getting even a single reply. I am losing my motivation to learn more because just learning not able to apply in real life makes those studies worthless for me. So help me get motivated again.

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

    My programming logic

    Posted: 28 Mar 2021 02:56 PM PDT

    I've been programming for a year now and I still can't build a simple tic-tac-toe or hangman game. The logic is just too great for me! Even though I can make a flow chart, I can't make the code. If you show me the code, I can understand. Sure, I coded a lot of more advanced projects but my logic sucks. Has anyone been in the same situation and if yes, what did you do to improve your thinking?

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

    How to search about a question or error you face during coding, when you’re not sure what to type exactly?

    Posted: 28 Mar 2021 11:23 PM PDT

    Hello there,

    Im currently doing internship and each tike I'm given a task or a project, i try to code it on my own or ask but sometimes I don't know which variable needs a certain loop or when to use if and else the basic stuff are still quite confusing to me, so i try to look it up and not sure what to type exactly to find the answer im looking for, even now I'm not sure how to describe exactly my problem unfortunately. :/

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

    No comments:

    Post a Comment