What is 'beautiful code'? learn programming |
- What is 'beautiful code'?
- A quick motivation to commit often
- Whats a unique/cool data structures that arent part of standard knowledge?
- On the virtues and vexations of commenting code
- Is there any study group for beginners in Inland Empire?
- I finally have opportunity to make my dream come true and learn web programing!
- need help [PHP]
- What does this code actually do?
- How to solve programming optimization problems e.g. Google Hashcode?
- Looking for Specific Tech Blogs (not directly linked with tutorials)
- [Excel] Formula to look for match between range in row and range in column, display first match
- Does learning bootstrap make it less necessary to internalize much of CSS?
- Deleting all occurrences of a specific value in a single linked list (java)
- How would you describe a "solid foundational knowledge" of SQL or python?
- [Python][Fortran] What is a good format to store data from python so it can be read by Fortran?
- Need help with this Lab assignment, I got stuck with just simple stuffs.
- How do i connect my NodeJS backend to my python script ?
- So I had an idea for a 2d isometric simulation like game. Where should I start?
- Loop question for Javascript
- I don't know anything about programming but I want to get started. How do I start?
- need help finding a javascript resource
- What language should I build this program in?
- How is the result 10 not 6? [Javascript]
- My program to find the sum of all elements in a matrix(using C) doesnt give the correct output.
Posted: 20 Feb 2020 08:08 AM PST Is it compact? Is it about executing a 200-line program with 15 lines of code? Is it understandable? What is it like in your opinion? I try to make my code easy to read, but often end up making it "my controlled chaos". [link] [comments] | |||||||||||||||
A quick motivation to commit often Posted: 20 Feb 2020 08:06 AM PST This is my story on how making consistent commits really saved me. I built out a developer portfolio about 2-3 months ago, and I thought to myself, "Should I really bother making lots of commits and branching off features? I'm the only one working on this and it's gonna be a pretty short project with very little future maintenance." But, as per the internet's suggestion, I (begrudgingly) did it. Of course, during development I ran into bugs, as we all do. After fixing the bug, I'd make a commit. I got the site to a state I was happy with and left it there. Two months after (AKA now), I'm working on a different site using (more or less) the same tech stack. And guess what? I ran into a very weird and obscure bug. The internet had little advice on it, because as I found out the issue was related to two technologies clashing with each other. It was also a bug that only showed up in the build version, which made debugging a looooot slower. So, I was in a bit of a pickle. Or, I would have been, if I hadn't encountered and solved this exact same bug two months ago on my dev portfolio. Of course, 60 days and thousands of lines of code later I couldn't remember what I did. "Crap", I thought to myself, "I don't remember how I fixed this". But then, a lightbulb went off. A lightbulb going by the name of "git commit -m". So, I went to my github repo of the previous project, opened the commits page, and searched it for "strange bug" (I specifically remember labelling the commit something like that because the bug was so odd). I found it, and since I was committing consistently for every feature I made or bug I fixed, the only thing in that commit was that bug fix. This made it super easy to see exactly what I needed to do. I applied it to my current project and, in a very short amount of time and no debugging, the issue was gone. So that's how making consistent commits with good messages attached (well, memorable messages anyways) saved me from debugging the same weird, obscure issue twice. ASIDE: If people want to know what the bug was, it was an issue where having a Framer Motion AnimatePresence component as a direct child of a Gatsby layout component completely breaks the layout, but only on build. It took me a while to figure that one out lol. [link] [comments] | |||||||||||||||
Whats a unique/cool data structures that arent part of standard knowledge? Posted: 20 Feb 2020 06:07 PM PST Im interviewing around and trying to learn all the things. I figured a neat little way to find some practical data structures to learn next would be things that other people have encountered recently. For example, I learned about suffix trees recently. Some use cases are max substring searching and word completions. [link] [comments] | |||||||||||||||
On the virtues and vexations of commenting code Posted: 21 Feb 2020 12:42 AM PST I think there's a lot of different opinions when it comes to commenting code. A few of the common adages that I've read are as follows...
Some of these I agree with less more than with others. For example, when it comes to the "self-documenting code" idea, that seems rather lofty, especially if you're a novice. You can try to use the most descriptive function and variables names you can, but some operations just aren't really that obvious to a novice. If you're handing over your code to a senior code reviewer, they may look at you commenting that you're iterating over a buffer and think, "Well duh." On the other hand, if you're a new programmer, and you're documenting for your future self, you might benefit greatly from that little reminder rather than looking at it and thinking, "What the f*** is this for?" People often talk about WTFs-per-minute but a novice programmer is obviously going to have more of those moments than a senior code reviewer. I also take issue with the idea of not commenting on what/how your code does something for similar reasons. I think it flies in the face of the idea that "good code should be self documenting", but frankly we're not compilers/interpreters. As a human being, it's a lot easier to read a comment that says something like, "This verifies the integrity of a checksum," than to see a block of routines to read the contents of a file into a buffer, generate a hash on that buffer, and compare that hash to the checksum the file was signed with. It's once again one of those things that comes down to who the comments are for: Your future self, or a senior developer who's reviewing your code? Not to mention, that as a novice programmer, if you're reading the comments for a project, you can learn a lot by comments that say HOW a program works. That leads me to a position where as a novice, I love code that's commented with how it works; but if I were a senior developer that was just trying to review someone's code, I could see how I'd be annoyed by it. Which brings me to address the cruftiness of comments... Sometimes as a novice developer, you write a lot of comments so "future you" can easily digest what's happening in the program. But the problem is as "present you" gets better than "past you" at programming, you need these superfluous comments less and less, and you're likely to be improving and modifying the code they pertain to. It then creates an extra maintenance overhead on yourself if you have an abundance of comments because you must update them accordingly with updates to the code, and at a certain point the annoyance of this outweighs their usefulness. It can be kind of useful as a learner to comment on common conventions with, "This is how this works," but as time goes on and those conventions become more familiar and second-nature, they become "the sky is blue" comments and you feel like they're not needed. But then, wait... What if you want your code to be accessible by other novices? Do you want to add the burden of extra maintenance on yourself so that others may learn? That might sound altruistic, but if you're working in a group setting with many contributors, it might behoove you more to have these kind of instructional commentaries for your less experienced cohorts than it would serve you to remove them. Anyway, I'm about two old-fashioneds into removing crufty comments from my project and was thinking about all this, and thought it might make for a good discussion. If not, git blame alcohol [link] [comments] | |||||||||||||||
Is there any study group for beginners in Inland Empire? Posted: 21 Feb 2020 12:26 AM PST Looking for getting help or maybe study together for each others. I've been taking class from Youtube CS50, it would be nice if you are willing to start I can help as well. [link] [comments] | |||||||||||||||
I finally have opportunity to make my dream come true and learn web programing! Posted: 21 Feb 2020 12:09 AM PST Hello everyone! I will try to make it short. So i am working as SEO in my company. I have told my boss in past that i have always wanted to learn web programming and today he told me that he wants me to build a company website. He told me that it will be beneficial for both. He will get website and i will start learning web programming. He told me that there is no rush, because they already have website, but it's just old and he wants me to make something new which meets new standards. Requirements are not crazy i guess. He needs me to build simple informative website. He is a patent attorney, so i should build website with listed services, company's history, group members (with photos) and a news slide. Integrating Linkedin, google maps and facebook page will be also nice. That's it. Guys, i just don't know where to start from and what will be the best way to build a new website. Any kind of help from you will be highly appreciated! I am really excited to finally start learn web programming and who knows, maybe i will become full time developer in the future! Thank you all in advance! [link] [comments] | |||||||||||||||
Posted: 20 Feb 2020 09:36 PM PST hello guys, so i create web-based reservation system and show room plans of the hotel include the information (room number, price, room type, etc) here is the code: and here is the results: https://i.imgur.com/zZUTfbN.jpg when a user clicked a button, the system will get the room number question is, how to get room number? example: when user click a7 room number, system will get the a7 room number to submit thanks [link] [comments] | |||||||||||||||
What does this code actually do? Posted: 20 Feb 2020 10:45 PM PST include<stdio.h> [link] [comments] | |||||||||||||||
How to solve programming optimization problems e.g. Google Hashcode? Posted: 20 Feb 2020 01:57 PM PST Hi, What resources do you think are useful and what to study to get better at solving optimization problems like google hashcode and codejam? What is your approach? Which materials should one study to solve the problems effectively? Thank you in advance :) [link] [comments] | |||||||||||||||
Looking for Specific Tech Blogs (not directly linked with tutorials) Posted: 21 Feb 2020 12:59 AM PST I was hoping anyone can help me discover tech blogs which generally talk about people's experiences, problems and solutions they came up with. I want to avoid blogs that talk of tutorials or making your life easy with so and so libraries. Most blogs are just flooded with this kind of stuff, mostly web development and libraries. And whenever I search the keyword software development end up on a page talking about webd and how to implement something. I know almost all of the industry is moving towards cloud based SaaS, I am pretty annoyed that because of this I can't find blogs worth looking it. Here are some blog posts, I admire and I am looking for something similar:
Also any subreddit for discovering such blogs will help too. TIA [link] [comments] | |||||||||||||||
[Excel] Formula to look for match between range in row and range in column, display first match Posted: 21 Feb 2020 12:43 AM PST I have a row:
And a column on another worksheet:
The formula should do the following:
So in the example above it would be:
Thanks in advance for all the help! [link] [comments] | |||||||||||||||
Does learning bootstrap make it less necessary to internalize much of CSS? Posted: 21 Feb 2020 12:22 AM PST I've been learning CSS and HTML on freecodecamp, and I'm about to start JavaScript. As I created super basic webpages for the projects required at the end of this first section, I was given a link to a "sample" webpage that ours should loosely resemble. I really liked the way the sample page looked and I made a post on this subreddit asking how to go about mimicking the style. Several responses I got gave me a "best they could with CSS" sort of response, and several people said " wait until you learn bootstrap, it makes all of this a lot easier to style." I'm not gonna lie, so far, CSS seems like my least favorite part about programming. I'm learning it and i know many of the basics already, but I'm just wondering. Will bootstrap or any other coding language or software make CSS less necessary? [link] [comments] | |||||||||||||||
Deleting all occurrences of a specific value in a single linked list (java) Posted: 20 Feb 2020 05:33 PM PST Hi! I have a project for my data structures and algorithms class that I need to finish by tonight, and this algorithm is the last part I need to finish. Basically, what the title says, I need to delete all occurrences of the value 0 in my linked list. This is the code I'm using so far: However, my inputs and outputs are not reflecting on how I would trace it. when I input a list of [link] [comments] | |||||||||||||||
How would you describe a "solid foundational knowledge" of SQL or python? Posted: 20 Feb 2020 05:17 PM PST Also, does SQL go well with python? Are they related/complimentary ? [link] [comments] | |||||||||||||||
[Python][Fortran] What is a good format to store data from python so it can be read by Fortran? Posted: 20 Feb 2020 11:07 PM PST I am using Python to retrieve data from Google Firebase but I then want to process that data and display it (as a table) with Fortran. My initial idea was to write it to text file line by line with python and then code a way to parse the text file with Fortran. But is there a better way or recommended data structure for Fortran? Example Data,
[link] [comments] | |||||||||||||||
Need help with this Lab assignment, I got stuck with just simple stuffs. Posted: 20 Feb 2020 11:03 PM PST Hello guys, so basically this is the requirement: Create a program that takes in Name, gpa, and scholarship amount from the user. Then print the name, gpa, and scholarship amount back to the user with default settings, then with at least 3 different output settings and see the difference. Then set the output settings back to default For the second part, this is what i got So for the first half, as for asking user input and print back to the user: this is what i got but keep running into problem: Basically it wouldn't let me type in the input for GPA and scholarship. After i type in the student name and it would just show the GPA and scholarship line. It's late and I'm having a brain fart and can't figure out what i'm missing right now. Any help would be much much appreciated. [link] [comments] | |||||||||||||||
How do i connect my NodeJS backend to my python script ? Posted: 20 Feb 2020 11:01 PM PST i have a NodeJS backend and i want to verify a file that is being sent to the server using my python script. Right now i'm doing it statically to make sure it works but i need to automate it. i was thinking of using node to move the file to a location that i point my python script to and just send the file name via a HTTP request. Do i need Flask or tornado ? and what do i need on the server side ? is there a better way of doing this ? [link] [comments] | |||||||||||||||
So I had an idea for a 2d isometric simulation like game. Where should I start? Posted: 20 Feb 2020 10:44 PM PST I use a very basic knowledge of python to make scripts at work (a retail it company). I also know postgres and bash. I had this idea about a game and i mostly should start from 0. I saw on internet that there is a thing called a game engine thats it supposed to be already pre-scripted for me to use too. So, what should I do? Open a py file and begin programming or I can start somewhere easier? Thank you [link] [comments] | |||||||||||||||
Posted: 20 Feb 2020 10:05 PM PST
However, I assumed the process to be ->
Because it seems like "num" has a constant value of 3 since there is no "num++" or "num--" and 'i' keep reset as 3 because of "let i = num" How is the value of "i" keep changing? [link] [comments] | |||||||||||||||
I don't know anything about programming but I want to get started. How do I start? Posted: 20 Feb 2020 10:04 PM PST I want to start programming. I always wanted to do it but never got into it. Recently 8 saw a post about a snake game bot and that inspired me to code a bot . I enjoy playing tetris and thought of learning to code so I can make a bot. Where do I get started and how do I make my tetris bit dreams come true? (I play tetris on the official website currently. Will any of your suggestions be applicable there or do I need to get another tetris application?) [link] [comments] | |||||||||||||||
need help finding a javascript resource Posted: 20 Feb 2020 09:58 PM PST i saw a resource that had an anime avatar girl and text bubbles and you would mostly just code along, i didn't do it very much i remember the very first few things was doing stuff with rectangles i've been looking through my history for a while now, i can't seem to find it pls help and thnak you [link] [comments] | |||||||||||||||
What language should I build this program in? Posted: 20 Feb 2020 09:39 PM PST To improve my current work center efficiency and branch to branch continuity I want to make a standardized, easy to use but individually customize-able program. The basic features of this program would include: More to it but those are the basic functions I'm looking for. I want the program to be as user friendly as possible, so that once it is implemented, actions and edits can be made by end users instead of requiring training for managers. [link] [comments] | |||||||||||||||
How is the result 10 not 6? [Javascript] Posted: 20 Feb 2020 09:00 PM PST I think the snippet should end here. How is that it continues until "total 6 + 4 -> total 10?" [link] [comments] | |||||||||||||||
My program to find the sum of all elements in a matrix(using C) doesnt give the correct output. Posted: 20 Feb 2020 08:29 PM PST [link] [comments] |
You are subscribed to email updates from learn programming. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment