What are some resources to learn good code design? Ask Programming |
- What are some resources to learn good code design?
- Hi everyone, I am in need of help to get ideas for my Degree in Software Development dissertation. I am interested in doing something related to SQL and web design, for example to do withSQL injection prevention, but I am out of ideas. Any help please? Thanks in advance
- I am learning the basic jscript. The code in Vscode is recieving an input from app. But the value is stored as character instead of string. It should have one value for single index. But the index value changes as it gets more characters in string. What is wrong? (Already checked with teacher code)
- Where are the places to get paid training in programming (entry level)?
- Skill Level of High School Programmers
- Small snippets of C. Need help finding possible vulnerabilities
- Should I use IDE or website platform for coding challenges?
- Where to start on decoding file
- Developers of tech companies whose traffic was decimated by COVID-19, what tech priorities have you switched focus to?
- How do I access the index of an element in an arraylist?
- Performance wise, is a class with a lot of methods slower?
- [PHP, JS, etc.] Do you default to == or === when making comparisons?
- What exactly is object-oriented programming?
- Should i learn Python and Java at the same time ?
- Small multiplayer poem-writing game with no JS skills
- I am 13 and want to start coding :o
- I'm not sure about whether OAuth2 and JWT is appropriate for my use case. I need help
- I have a question about the use of classes.
- Need Help with C Project - (bin to dec conversions and vice versa, complex number calculations, random number generator, and a functional main menu)
- Java
- is it bad practice to write dot files that are not configuration files?
- What are some cases AGAINST setting up a RESTful API?
- Best free, affordable, and overall bootcamps?
- Efficiency Comparisons for Basic Programming Logic?
What are some resources to learn good code design? Posted: 30 Mar 2020 05:23 PM PDT I'm not a software developer by trade but I've written enough scripts and video game demos to know that I can handle the logic required for coding smaller-scale projects. However, what really makes me feel like a poser is that I just don't get the design aspect of coding around object oriented programming. Yeah I understand what a class is, but I dont know when I'd make a class vs a function vs a new file and how do I decide on the fly. How do I know how to organize my code up front? It's the actual design of my codebase I suffer with. [link] [comments] |
Posted: 30 Mar 2020 08:07 AM PDT |
Posted: 30 Mar 2020 11:14 PM PDT Error in console.log() {type: "inc", description: "", value: ""} app.js:114 {type: "inc", description: "d", value: ""} app.js:114 {type: "inc", description: "da", value: ""} app.js:114 {type: "inc", description: "dad", value: ""} app.js:114 {type: "inc", description: "da", value: ""} app.js:114 {type: "inc", description: "dat", value: ""} app.js:114 {type: "inc", description: "data", value: ""} app.js:114 {type: "inc", description: "data", value: "2"} [link] [comments] |
Where are the places to get paid training in programming (entry level)? Posted: 30 Mar 2020 11:13 PM PDT |
Skill Level of High School Programmers Posted: 30 Mar 2020 11:07 PM PDT Hello I was wondering what are the skills level of high school student in america are like. I am actually moving to america to finish highschool there, after I finish the current school year. I have seen comments on facebook, reddit and other platforms where people talk about how highschool programmers can do the same tasks as other programmers with less money. I am definitely not around that level, but I feel like I wouldn't be able to fit in if I my programmer skills aren't as good as other guys there. It would be great to tell your experiences or opinions about this, because I feel like not being able to fit in with other people with programming interest there could be a possible scenario. I hope that my post was relevant to this subreddit [link] [comments] |
Small snippets of C. Need help finding possible vulnerabilities Posted: 30 Mar 2020 08:50 PM PDT I have 4 snippets of code, two of which I can identify and the other two I am having trouble with. Any help is appreciated thank you very much. ^ In "SNIPPET 1", I think the vulnerability is if the filename is too long it can cause a buffer overflow, to mitigate it, you could check the length of "filename" before writing to the "command" buffer. ^ In "SNIPPET 2", this has to do with MAX INT value and it will overflow but I can't really explain it well or how to fix it ^ I am not sure about SNIPPET 3, there is no buffer overflow because there is a width specifier on the scanf. ^ I cannot see where the vulnerability is in this code either. [link] [comments] |
Should I use IDE or website platform for coding challenges? Posted: 30 Mar 2020 08:01 PM PDT I am currently learning c# and want to improve by practicing coding exercises. I mostly use code-wars. Whenever I am doing any exercises, it seems impossible to do it on code-wars default editor. I get stuck on syntax, and other nuances like not capitalizing a letter or something alone those lines. Now I am wondering if its a good idea to stick to using my visual studio IDE to solve the question and then copy and paste it to code-wars default editor or to switch over to only using their default editor? [link] [comments] |
Where to start on decoding file Posted: 30 Mar 2020 07:35 PM PDT Hi all, I have been looking into the drop chance tables for a game I play and have managed to extract them from the .cache file. However these files have no identifier attached to them and are just gibberish when I open them up in a hex editor. Is there any possible starting point to trying to make this gibberish make sense? [link] [comments] |
Posted: 30 Mar 2020 06:33 PM PDT I'm a developer for an e-commerce site. Our traffic is severely reduced due to the nature of our business being affected by COVID-19. We are now focussing on major tech debt to fix that would have otherwise been too risky, or needing heavy coordination to keep continuity (DB tuning and upgrades needing restarts, blocking traffic while we implement a breaking change to a data model used by all apps, ...). What has been prioritized and what have you been able to fix that's been a thorn? [link] [comments] |
How do I access the index of an element in an arraylist? Posted: 30 Mar 2020 04:55 PM PDT I have an arraylist. I wanted to do a for each loop, but I need to use the index of the current element in what I wanted to implement. is there a function that works like this? : arrayElement.tellMeItsIndexInTheArray() [link] [comments] |
Performance wise, is a class with a lot of methods slower? Posted: 30 Mar 2020 04:25 PM PDT For example, let's say I have 2 classes (perhaps a ChessBoard or something like that). These 2 classes have the exact same data structures. But one class has 5 methods, and the other has 20 methods. Then let's say I use recursion to create a tree of game moves (for AI calculations, for example). Will the class with 20 methods be the same speed, slightly slower, or way slower than the class with 5 methods? In theory they have the same data structures and take up the same amount of space in memory, so they could be the same speed? [link] [comments] |
[PHP, JS, etc.] Do you default to == or === when making comparisons? Posted: 30 Mar 2020 04:22 PM PDT In loosely typed languages like PHP and JS, you can do a loose type comparison with I default to [link] [comments] |
What exactly is object-oriented programming? Posted: 30 Mar 2020 11:13 AM PDT I've never actually done programming before. But I'm currently working through a Linux Essentials course trying to become competent enough with using it to eventually take the RHCSA. But I've currently hit a road block as we are now covering programming languages used in Linux environments like Java and JavaScript, Python, Perl and others. And the topic of object-oriented programming keeps popping up. [link] [comments] |
Should i learn Python and Java at the same time ? Posted: 30 Mar 2020 02:57 PM PDT I have finished a Java Tutorial and i want to do some projects. A week ago i got a raspberry pi and it seems like most of the projects are for python. So i am wondering if it wouldnt be contraproductive to learn both at the time ( i am a beginner by the way). [link] [comments] |
Small multiplayer poem-writing game with no JS skills Posted: 30 Mar 2020 11:06 AM PDT I would like to create a small web app that is the online version of a silly game where you write a poem together with your friends. How the real life version works is that everyone has a piece of paper, and they start by writing one word. They pass the paper to the person next to them, that person writes two words. The second person folds over the top of the paper so that only the line they wrote is visible to the next person, and so on-- you can only see the line the person right before you wrote and nothing else. Each poem has a "V-shape": it goes from 1 words to n words and then from n words back to 1, where n is the number of words in the longest line (usually 5). I haven't been able to find anything online that does this, if it already exists please let me know! How I'm envisioning this: - someone starts a private game, the link to which they can share with friends (similar to skribbl.io, for example) - on the startup screen you select the max. number of words in your poem - the "mod" (person who created the private game) starts the game - everyone writes their first word and presses a button to indicate that they're done and ready to "pass on" their poem to the next person - there's maybe a counter somewhere on the screen that shows how many people are done - once everyone is ready, you see whatever the person "before" you wrote last, and the number of words you have to write - rinse and repeat - once all poems are completed, they are all displayed for all users to read and save My issue is that although I can write code, I am actually a bioinformatician with zero knowledge of JavaScript or another language useful for web development-- I really don't know anything about web development at all. I know R, Python and a little bit of C and that's about it. For a single user I could write this game, but for multiple users who connect online? Not a clue. From my research it seems I'll have to start with something like the socket.io tutorial to learn more about how to think about web apps. Then I'm thinking about following this tutorial and take from it what I need. Any suggestions? Github repos, tutorials you've found useful? [link] [comments] |
I am 13 and want to start coding :o Posted: 30 Mar 2020 02:36 PM PDT I want to start coding as I was motivated by seeing people make games under 24 hours or such using unity, but I have also heard that python is an easy way and very simple to get into. Now i'll be very honest and say that I really want to create games! But simplicity is also there and I have heard how grueling C# is. Which one do I start with? TL;DR : I want to start coding, do i start with C# or python? [link] [comments] |
I'm not sure about whether OAuth2 and JWT is appropriate for my use case. I need help Posted: 30 Mar 2020 02:03 PM PDT So at the office we have an app that consists of a front end application and a backend made of several microservices. This program is still manageable but it has many design flaws, one of which is the whole user system. To be completely frank, it is a security nightmare waiting to happen. There is no security on our routes. Very few people at the office understand security, I had somewhat of an inkling of what it involved because I've had to deal with JWT and OAuth2 but I'm not particularly well versed in it either. For starters, I understand you use OAuth2 to get services to interact with each other securely. For example, say my app needs to send stuff to google drive, so my app must use Oauth2 to redirect my users to Googles SSO page, so that they can authorize my app to use their account on Google Drive. Google sends my service a token with information, mainly the user's identity, the things that my service can access, the exipiration time and some other information, so that I can continue to call the apis I wanted to call without issue. We don't need to contact any outside services at work yet, but we do need to secure our APIs. Session based security is one way to do it, but I hear it has issues with microservices. JWT tokens are another way to do it. Having a single centralized server to handle that seems to be a good solution. At first, and because I didn't know, I started to create our own JWT system, it was extremely insecure and faulty to say the least. It was pointed out to me in another subreddit that I should use KeyCloak, Auth0 or some other provider, because this is something that is very difficult to do and that they already handle well. So, now we have shifted to one of those providers. My idea is to use Resource Owner Password Credentials to do this since we're the ones issuing identities, and our users are basically internal users. I'm not sure whether this is the right path to take, I don't know if session based security might be more convenient. So I came here to ask more, because honestly, I'm out of my depth here, and this is very complex. I would appreciate if someone could help me out. [link] [comments] |
I have a question about the use of classes. Posted: 30 Mar 2020 01:58 PM PDT I am trying to write a program that simulates a car race in c++. I am trying to uses different classes. What types of classes would I use? [link] [comments] |
Posted: 30 Mar 2020 01:41 PM PDT I've been going along thinking I had a whole week longer to do this, then found out this morning the project was in fact due today. I've been working on it on and off through the past month but I really hadn't put any real effort until today. And to make matters worse I just started a new anti-anxiety medication that gives me headaches later in the day, AKA now :( I feel extremely overwhelmed and my brain is too fuzzy to organize itself right now. I'm not going to post the entire assignment because 1. it's like eight pages of detailed instructions, and 2. I don't want the work to just be done for me. Here's the sum-up: Main function: Displays a menu asking which program to run (Dec to Bin / Bin to Dec / Complex Numbers / Puzzle / Quit) enter a number 1-5 to select. Displays an error if user enters a non 1-5 number. Include error messages in all subprograms as needed. Have a function that does the work for the code wherever possible. Subprograms: Subprogram Dec to Bin Converts non-zero decimal numbers into binary numbers, then calculates the number of bits of space needed to store said decimal number. (function name: dec2bin) Subprogram Bin to Dec Converts a binary number to a decimal number. (function name: bin2dec) Subprogram Complex Number Calculator Prompt the user for two complex numbers in either form (1. polar, 2. Cartesian), prompt the user for the operator needed (+, -, *, /) and preform the calculation. (for example, the user could input "2 -5.5 13.2", the 2 says its in Cartesian, the next numbers are the coordinates). After calculating, output the new numbers in BOTH FORMS. (function name: complex_calc) Subprogram Number Puzzle Prompts the user to enter a number between 1-10. If the user guesses too high or low, it gives a hint to go lower or higher. Display the number of attempts the user has made so far and disregard incorrect inputs (0 or 12) as attempts on the counter. Make sure the number is a truly random number by using num = rand(); (function name: number_puzzle) Subprogram Quit When the user chooses to quit, simply exit the program. Here is my current code, it's a wreck and I'm sorry:
[link] [comments] |
Posted: 30 Mar 2020 11:59 AM PDT Below is a snippet of code in the Timer class of a desktop program that functions like the Android Clock. The code worked fine until I fixed an error in another class and added the playMusic method from the Alarm class. I got the error then on the line with the alarm class. I figured I needed to add another bracket, because the lambda expression now was longer than one line. I did, but i am still getting the same errors on compile. totalTime is being caught as an "Unknown class". Before it worked fine as the amount of time until the window of TimerAlert is displayed. Any help would be appreciated. //Button that sets the timer in motion and its code int hours1; if(Minutes.getText().isEmpty()){ if(seconds.getText().isEmpty()){ int totaltime = hours1 + minutes1 + seconds1; //The "u/" that's showing in the post should be an @ sign. It doesn't display correctly even if I delete it and rewrite it. [link] [comments] |
is it bad practice to write dot files that are not configuration files? Posted: 30 Mar 2020 11:16 AM PDT hi everybody, i'm in the process of writing myself a utility similar to 'autojump' to jump to directories instead of using cd. i'm using a very simple python script to complement a bash function in my bashrc. i've realized that it's not that easy to get python and bash to interface in a clean, easy way. the best solution i've found is to write the python output in a file and then access it through bash. i'd like the file to be a hidden file in my home directory (it gets overwritten every time i launch the function), and so i used .jump_dir as a filename. is it bad practice to use dot files this way? are they supposed to be only for configuration files? [link] [comments] |
What are some cases AGAINST setting up a RESTful API? Posted: 30 Mar 2020 03:31 AM PDT If you run a good website where content complies with accessibility standards, and is actually a good website AND you have your own web app - Do you even need a RESTful API? Especially when you're dealing with userdata and databases. Wouldn't this just expose you to more bugs, and security flaws? Seems like a recipe for disaster. Asking as a devil's advocate, because I'm about to make a presentation FOR it (as in, "please hire us - you need one"), and I want to be prepared for any kind of question / hurdle. [link] [comments] |
Best free, affordable, and overall bootcamps? Posted: 30 Mar 2020 11:01 AM PDT I am in a weird position where I am mostly self taught. My knowlegebase and skillset are therefore all over the place. I'm looking for something that will put me on a more even track and allow me to learn full-stack skills. I have heard about flatiron. I am looking for something that will teach me full stack as well as interviewing/best practice skills for searching for, getting and maintaining a job. But I would love to do it at an affordable price. What is your favorite FREE bootcamp tool, your favorite affordable/cheap tool and your favorite overall tool (at any price point) that you recommend? [link] [comments] |
Efficiency Comparisons for Basic Programming Logic? Posted: 30 Mar 2020 10:37 AM PDT I'm a relatively new .NET developer and I'm curious about the efficiency between everyday logic, like For vs Foreach vs Select/Where LINQ Queries, or .Length vs .Count, that kind of thing. Is there a website/simulator where I can test things like this? I know Resharper exists, but it's a pain in the ass on my workspace and causes Visual Studio to crawl. [link] [comments] |
You are subscribed to email updates from AskProgramming. 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