• Breaking News

    Sunday, January 12, 2020

    What have you been working on recently? [January 11, 2020] learn programming

    What have you been working on recently? [January 11, 2020] learn programming


    What have you been working on recently? [January 11, 2020]

    Posted: 11 Jan 2020 08:04 AM PST

    What have you been working on recently? Feel free to share updates on projects you're working on, brag about any major milestones you've hit, grouse about a challenge you've ran into recently... Any sort of "progress report" is fair game!

    A few requests:

    1. If possible, include a link to your source code when sharing a project update. That way, others can learn from your work!

    2. If you've shared something, try commenting on at least one other update -- ask a question, give feedback, compliment something cool... We encourage discussion!

    3. If you don't consider yourself to be a beginner, include about how many years of experience you have.

    This thread will remained stickied over the weekend. Link to past threads here.

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

    I Follow This Method Whenever My Brain Is struggling With A Complicated Programming Task. I Thought It Is Worth Sharing With The Community.

    Posted: 11 Jan 2020 12:34 PM PST

    As a software engineer, I felt stuck countless times during project development. As a programmer, you might have experienced this feeling yourself, I bet.

    Regardless if it is work-related or in a personal endeavour, you usually start projects very enthusiastically.

    However, when a specific task feels too overwhelming, you tend to lose focus, procrastinate, and sometimes even question your very decision of pursuing a career in your current field.

    I want to share with you a simple way that will greatly help you overcome technically-challenging tasks.

    Whether developing software or trying to solve coding challenges, applying this method will help you finish your most complicated tasks.

    I call this method: Elementary Task In Progress (ETIP).

    What do I mean by elementary? By definition, an elementary task is a very simple and basic task that is hardly broken down into smaller, easier steps.

    The task in progress should always be elementary so that its execution is straightforward.

    Let me clarify this further by asking you a question: "What is the most basic step you can do to get closer to finishing your complicated task?"

    Identify that step. Turn it into a task on its own. Work on it. That's your ETIP.

    If you are stuck in your project because the task in progress is too complicated, chances are, your task is not an ETIP. Turn it into an ETIP by applying the following steps:

    • Break the task in progress into simpler, more basic steps.
    • For each individual step, break it up even further until it is in its most elementary form. This is your ETIP.
    • Pick the first ETIP and start working on it.
    • Once done with your first ETIP, move to the next one.

    Never work on a task that is not an ETIP!

    Remember, the task in progress should always be so elementary that its execution is straightforward.

    Do you feel that your next task is too complicated? Time to break it down into ETIPs.

    Use the ETIP method every time a task feels too overwhelming. Break your task into basic and simple steps that you can execute easily.

    While it is almost unavoidable that you will encounter challenging and complex projects that are made up of complicated tasks, you should not work on a task unless you make sure its completion is simple.

    The ETIP method will help you to always progress in completing your projects no matter how big the challenges you are faced with.

    I hope this advice will be helpful to you.

    If you can you relate to this? Then let me know your thoughts in the comment section.

    submitted by /u/jones-macallan
    [link] [comments]

    I created a bookmark reading list for programmers

    Posted: 11 Jan 2020 10:22 PM PST

    I'm sure that many programmers like me, don't know what's good Github repo to give a star, what're Github users to follow, any interesting articles to read every day or where to register an email newsletter... So I created a bookmark reading list: https://bookmark.duthaho.com, it will be updated every week to be included a ton of useful links, articles.

    I don't know if it is useful for you, but give it a star if it does ; ). Your comments here will be very appreciated.

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

    Anybody else find doing tutorials boring?

    Posted: 11 Jan 2020 10:02 PM PST

    I know they are important for learning the basics but they get so boring so fast.

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

    MIT open courseware algorithm lecture question

    Posted: 11 Jan 2020 11:27 PM PST

    At 27:31 he introduces a problem which involves finding a peak in the array provided of size n. The technique he introduces involves a binary search. He starts at the middle at the n/2 position and compares the n/2 position with the value on the left(n/2 - 1) and the right(n/2 + 1). He goes on to explain the concept if you keep watching.

    My question is, let's say the value at n/2 is indeed smaller than n/2 +1 and we proceed to eliminate the left side and search the right side for the peak. What if the peak is actually in one of the indexes between 1 and n/2-1 aka the left side which we eliminated. Isn't that a flaw in this method?

    https://www.youtube.com/watch?v=HtSuA80QTyo&list=PLUl4u3cNGP61Oq3tWYp6V_F-5jb5L2iHb&index=2&t=0s

    submitted by /u/2kfan
    [link] [comments]

    If you repeat your code, delete your code

    Posted: 11 Jan 2020 01:27 PM PST

    This is a motto I've been using ever since starting to code a few years ago. I would see other students with a program of 1,000 lines, that could have been written in 200 because they didn't utilize if statements.

    If you find yourself repeating the same code chunk (or very similar) multiple times, it's likely that you can wrap it in a loop, function, or switch block. Of course, this doesn't work for ALL cases, but in my experience it can be applied the vast majority of times.

    Similarly, if you need to update the same value repeatedly, assign it a variable!

    This makes for cleaner, simpler, and more elegant code, and you'll thank your future self.

    If nothing else, at least the motto is kinda catchy :)

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

    Having trouble learning how to "actually code"/imposter syndrome

    Posted: 11 Jan 2020 11:18 PM PST

    Hey everyone, I've been in a weird position for a little over a year now. My first programming language I had picked up was C++ in Unreal engine (udemy) and I feel kinda confident in it (unless it's shaders).

    I've been wanting to learn other languages/C++ outside of UE4 and I've been struggling with learning or retaining the information and I feel as if it's due to having no planned projects/ideas that I want really want to work on which makes me feel as if I have imposter syndrome. (Only other languages I know are HTML/CSS due to my last semester of college)

    My question is that do any of you out there have any good ideas on how to really push past that feeling and ways to come up with project ideas to re-inforce what you just learned?

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

    im sorry for me being a noob what are some good books about programming

    Posted: 11 Jan 2020 08:54 PM PST

    People have told to start with C++. But what do you all recommend a for book and a language. For a beginner. Thank you for your time.

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

    Need help regarding best way to solve this problem.

    Posted: 11 Jan 2020 11:04 PM PST

    Hi,

    I am currently working in a tech startup where we extensively use Java for everything. Microservices architecture is followed to some extent. All these microservices do some business transaction processing most of the times. My question revolves around the transaction processing operations and how to achieve it in a true Object Oriented way.

    Suppose I have an `Order` object, in the course of a transaction, it can be in any one of the order states. Order states can be `created`, `approved`, `shipped`, `delivered` and so on. The state of an order is represented by the `state` field of the `Order` class. So whenever, any operation is performed on the `Order` class the `state` field is checked to verify if that operation is permitted in that state. One such example would be that order can't be delivered if it's not yet shipped. So on the invocation of `order.deliverItem()` , the `state` field is to be checked if it's in `SHIPPED` state, only then process the rest of the operation, or just throw an Exception.

    This is reasonable way of solving this state problem, where we explicitly check if the order is in desired state to perform the required operation. But the problem with this approach is that, the number of states an order can be in, can increase over time. Right now, in our system an order can be in one of 15 states. Then it becomes tedious to write state checks in every operation that is performed in the `Order` class. So, one way of solving this issue here is we can use `spring-statemachines` where we can define a finite automata which has bunch of states and transitions between states. Spring statemachines also provide flexibility of organising code in terms of actions, and assign actions to each of the transitions. Then inside the action, we can actually invoke the required operation on the `Order` class.

    But the problem with this approach is that, in here we are exposing the internal states of the `Order` class to the `spring-statemachine` library in order to build the state machine transitions and states. Does this not violate the Encapsulation property of Object Oriented Programming? Or is it fine? Is it okay if, inside the action method, I take the `target` state of the transition and do something like `order.updateState(targetState)`?

    I am reconsidering the design of this because recently I read a post where it mentioned that updating the internal fields where the value is supplied as input like `order.setState(newState)` is against the object oriented programming. And it makes sense, because the internal states of the `Order` class should only be internal to it.

    I need some help regarding how this can be solved, I am more inclined towards programming in an Object Oriented way, and this kind of problem makes it ambiguous on how to go about it.

    I am cross posting this in r/learnjava and r/learnprogramming. If this isn't the right place to ask such questions, then do please guide me where I can ask these types of design questions, which aren't necessarily very basic problems.

    Thank you.

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

    Tree traversal question and solution. Is making no sense to me. Can anyone explain it ?

    Posted: 11 Jan 2020 11:30 AM PST

    For reference, this is a question that was in a programming test for Akuna Capital, a finance company. This problem asks the user to find the traversal order of this tree. Here is the function:

    function f(node) if node is null return end if f(node.left) f(node.right) visit(node) end function 

    https://imgur.com/a/y01ke9N

    The correct answer is:

    D, G, H, E, B, I, F, C, A

    How is that the case ? That is making no sense to me. Does the traversal not start from the root ?

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

    Swap Puzzle not swapping pieces after I shuffle

    Posted: 12 Jan 2020 12:21 AM PST

    Hello, I was hoping some one could help me out. I am using visual basic 2015 and coding in vb and am making a swap puzzle that shuffles the pieces then when you click on a piece in a tlp and then when you click another piece it swaps them. The pieces swap fine if you don't shuffle it but when you do it only swaps pieces that are side by side and not touching the left edge of the grid.

    Heres all the code: https://pastebin.com/Vx9zJ5HA

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

    Username Checker app

    Posted: 11 Jan 2020 11:35 PM PST

    Hi all -

    Can anyone help me with how the Username and Domains checker applications programmed

    does the application pre-stored the websites on the Database and when the user enters the domain, He checks the availability of the domain for every stored website?

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

    Which language would you recommend me to learn first? Any advices?

    Posted: 11 Jan 2020 03:51 PM PST

    I'm currently interested in programming and CS/SWE but I don't know any languages yet. I have been told that i should learn Python first, any advices on what language or what resources you recommend to learn the language?

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

    What do you guys think about Stefan Mischook's web development course, is it worth it?

    Posted: 11 Jan 2020 11:17 PM PST

    Have you taken his course? if so, was it good?

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

    My teacher asked me to print a diamond pattern in Python. I did it. He told me that I was using Python like C and that I can do it in 2 simple loops using Python. That is my assignment and I am unable to understand how I can do this in 2 loops. Please help, guys!

    Posted: 11 Jan 2020 07:23 PM PST

    Learning TDD , how do you do it?

    Posted: 11 Jan 2020 02:16 PM PST

    Hello, I teach my self JavaScript and I have been hearing about TDD, and all about how it's good and all that.

    so I already have a project, that I did, and I wanted to refactor it to add test to it, but I really don't know how, or where to start. the project uses NodeJs in the back-end.

    All the tutorials teach Jest, Mocha, Chai, but never really using tdd to create a real life project with it.

    how do I get on about this?

    submitted by /u/OnionKa-help
    [link] [comments]

    edX programming course or self-study?

    Posted: 11 Jan 2020 09:53 AM PST

    I'm sort of a beginner to programming and am looking to learn Python, with the goal of getting into the field eventually (maybe starting as a junior dev).

    There's a course offered by Microsoft on Edex that is an intro to CS, lasting 4-5 months. At the end they give you a grade and certificate of completion. The pro of this: accountability, so easier to stay dedicated, and certificate.

    Another method I have is self-study from Python books (online and paperback). This requires more discipline than taking a course, but also probably seems more impressive to future employers seeing that it's self-study. Please correct me if I'm wrong on this.

    Which method would you advise I take on? Thanks for any insight in advance.

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

    Are you interested in guaranteed feedback for your projects?

    Posted: 11 Jan 2020 10:49 PM PST

    I have built over 80 applications across my 10 year career in web development (many for businesses) and thought it would be good to offer guaranteed thoughtful feedback on any web project you're working on.

    I've noticed many of the auto-moderated posts that request people show-and-tell their personal projects to update others and seek feedback generally receive no feedback. This can be disheartening for people early on who are creating their own stuff.

    I've created a post here and will give feedback on any projects posted: https://www.reddit.com/r/Stackweaver/comments/enk6m4/guaranteed_feedback_for_your_projects_post_here/

    (or comment here, of course)

    The idea would be to have a place you can always get feedback so you're not speaking into the void.

    Is this something others would find useful? Do you care about feedback on your projects or do you mostly look for a little encouragement?

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

    [Debugging] Efficient code foreach display doesn't work

    Posted: 11 Jan 2020 06:57 PM PST

    SOLVED

    Okay I know that the title is a bit vague but this is what I am doing:

    I am gonna put clues all over my website if you click on a clue you get a text underneath it and in the top right corner you can reopen your clue (haven't done that part yet).

    What works:

    The first clue (eerste) works, if I click on that one the text underneath it appears and the clue also comes in the top right corner.

    What needs to be fixed:

    1. The second clue doesn't work. When I click on that one nothing happens.
    2. If I open the first clue the second one opens as well.
    3. I can't add a clue in the corner for the second clue because than the first one doesn't work.

    Any tips? Here is my code:

    https://codepen.io/ivan-salim-rasoel/pen/MWYGzOK

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

    How to learn more CS after graduating with a CS degree?

    Posted: 11 Jan 2020 01:55 PM PST

    I'd like to continue to improve and learn. So far I've learned all of commonly used design patterns for OOP in the Gang of 4 book. I've gone through a book that explains functional programming in depth. Now I'm completing the Nand2tetris course which is the most enjoyable course I've taken thus far.

    https://www.nand2tetris.org

    However I'm at a loss now on how I can continue to improve myself once I complete nand2tetris. Personal projects are great and all but I'd to advance my knowledge of CS theory / software engineering, over just focusing on gaining programming experience.

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

    what is the equivalent of phpstan but for javascript?

    Posted: 11 Jan 2020 10:38 PM PST

    Looking for great static analysis, both for front-end (vanilla JS, and a little bit of Jquery) and back-end (express node)

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

    trying to teach someone DSD and ERD. looking for a way to explain the differences and how to ask the right questions.

    Posted: 11 Jan 2020 10:37 PM PST

    for example, for a DSD i tell him to think about what the system KNOWS.
    and for ERD i tell him to ask what the system knows about the data, what are the relationships between what she(the system) knows.

    however i myself think this is a bit obscure. so in hope of solidifying both his grasp AND my grasp.

    i asked here :)

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

    Is what I created considered a progressive learning algorithm?

    Posted: 11 Jan 2020 12:02 PM PST

    In the past week or so, I've been creating a game of hangman which learns from your gameplay (order and frequency of the letters you guess) to give progressively hard words, for example, if you guess the letter E first every time, it'll collect that data and learn to give you words exclusively without the letter E. I'm trying to describe it on my resume, and I use the word progressive learning algorithm in to help describe its function.

    What I'm unsure about is if this too basic/unrelated to be a progressive learning algorithm. I don't want to mislead an interviewer and then give an unsatisfactory response if they ask about what progressive learning algorithm I use, and I say "oh its just a small thing I made". Is what I made a progressive learning algorithm?

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

    How come I see so many people hating on Java?

    Posted: 11 Jan 2020 09:19 PM PST

    I know this question has been asked before, but that was four years ago and I'm wondering if opinions have changed, The first language I began learning was python but I quit that to learn java (which weirdly enough came much easier to me than python). But then I do a bit of research and see so many people calling java garbage, but I absolutely love it. Are there actual reasons to why it seems to get so much hate, or is it like that with all languages? Of course, being how much I love java and all the time I spent learning it, I am a bit hurt to see people criticizing it so much. What are your thoughts?

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

    Need Help With Number Generator

    Posted: 11 Jan 2020 05:14 PM PST

    I made this number generator where it outputs 50 numbers ranging from 1 to 100 but I need to find a way for it to create a new line whenever 5 numbers are printed. And also, I need to initialize an array that goes in the place of the 50 in the while statement, but whenever I do that, I get an error stating "operand types are incompatible". Can anyone help?

    #include <stdio.h> #include <iomanip> #include <iostream> #include <ctime> using namespace std; int main() { srand(time(NULL)); int i = 0; while (i++ < 50) { int r = (rand() % 100) + 1; cout << " " << r; } cout << "\n"; return 0; } 
    submitted by /u/Yuiyfilyfuif
    [link] [comments]

    No comments:

    Post a Comment