Demoralized by good code Ask Programming |
- Demoralized by good code
- Checking to see if 3 MIDI signals make a chord.
- Setting Region or "Square" of elements of an Array
- Denormalized database
- I'm using async/await functions on an array of IDs to send out 10 API calls sequentially, then I want to dispatch that new array of responses to my reducer. I've retrieved my responses in order, but I don't have access to dispatch. Am I hopeless?
- Need Help: Website vs Program
- Math on a 40 digit number?
- Which languages should I learn for my app? React or Swift/Java
- Is there a GUI framework that lets me specify layout constraints as linear equations?
- I want to sort some data on a website
- Resources for Architecture and Data Structure of Activity Feeds / Timelines
- Is Unity still the best route for developing cross platform mobile AR games?
- SQL Query Select Question
- can´t solve this problem.
- Short-lived instances of Python server?
- [HTML] How to load bootstrap css properly?
- What do you do to get unstuck?
- Using way too much data
- What language should I use?
- [java] trying Externalization, not able to persist the objects state, every thing is initialised to default ??
- What is the convention on where to write new functions?
- [JAVA] String comparison
- How to create Background applications?
Posted: 05 Jan 2018 05:17 PM PST Recently, I started working on a project for personal use that consists of a library (that can be reused in my future projects) and a GUI that uses that library. While writing the library, I thought it would be a good idea to make it "efficient" so I scrolled through some open-source libraries to borrow some helper methods/functions that could be useful in my project. However, not only was it too complex for me to understand, I felt utterly demoralized in progressing my own project as I feel like my own code will never be as "optimized" or "scalable" as theirs. Have any of you ever felt that way? Should I take time and try to understand their code in order to improve my coding or should I keep writing my spaghetti code? Btw, I'm currently a U1 SE student with some background in programming. [link] [comments] | ||||||||||||||||||||||||||||||
Checking to see if 3 MIDI signals make a chord. Posted: 05 Jan 2018 11:49 AM PST I'm trying to learn how to play my keyboard. I found a monosynth and I made it into a 3 Oscillator synth. My way of determining the chord is just a ton of if statements. You can see how I'm checking for a chord on line 128. https://github.com/taylor24/ChordHelper/blob/gh-pages/index.html It's ugly, and it will only give you the chord if you hit them in order (C first. E second and G third) = Major C. If you play G E C, it wont give you C Major. How can I check to see if the perimeters make up a chord? [link] [comments] | ||||||||||||||||||||||||||||||
Setting Region or "Square" of elements of an Array Posted: 05 Jan 2018 06:28 PM PST Hello everyone! I'm using a 2D array to generate rogue-like dungeons, very simple, drunkard walk-style. I'm trying to make it more dungeon-like by having corridors and rooms, I currently have my "crawler" choose a random direction with a random corridor length, (setting the appropriate elements to 1 for a floor). At the end of the corridor I'd like to create a square, pick a new direction, repeat etc. I'm sure this is simple I just put my finger on it right now for some reason, but what is an efficient way to set "square" or region of elements in an array. I currently have this when i reach the end of a corridor: cx and cy is my "crawler" position in the array
And THIS is my result EDIT: Formatting [link] [comments] | ||||||||||||||||||||||||||||||
Posted: 05 Jan 2018 04:41 PM PST I am working on an API that my colleague started the basic structure of and it has led to a point of contention between us. He says that every entity in database should be linked to our main user entity. He says that this is "modern" database design. We have multiple user types and this design was just getting too complicated linking everything to the same table so I had to create a user table for each type of user for my own sanity which upset my colleague and he keeps referring to this as the old way of doing things and not as good performance. It actually wasted a lot of my time trying to shoehorn the requirement into a single table format and it's not something I have heard of. I told him that it is standard practice to have a table for each user type that has foreign key to universal user table and then have everything specific to that user type linked to that table. He says this is bad practice now and modern way is to have everything linking to a single table. I asked him what this setup is called and he just said "denormalization" which I know as removing redundant tables, I haven't seen anything so insistent on single parent table design. English isn't his first language so the discussion is not always so easy but I cant really see the benefit. I have added parent id as a index on all descendants enforced as required field through the ORM so you can still query each table by user ID with good performance but this way it's much easier for me to code the inter user logic as I am dealing with different entities accessing common entities. I could probably make it work with a single table but I would be using so many switches and enums in each record it would just be really confusing for me to get the logic down and I feel like it would lead to more bugs. In the end he just said for me to do what is in my skill level but the inter user logic I am implementing is quite complex so I feel like this is right approach but he says my database design is bad. I am not good with databases so want to improve but not really sure what I should be researching. This guy has more experience than me so I think he is probably right but he lacks the language for me to have proper discussion on the requirement. Any advice? [link] [comments] | ||||||||||||||||||||||||||||||
Posted: 05 Jan 2018 11:31 AM PST RESOLVED. I incorporated the async/await logic into the reducer that ran right before this one was supposed to. It's a long promise chain, but it works. Background info: I'm using the OMDB api to create a web app that has a search bar at the top. This project is mainly to get a better grasp on react-redux, react-router, webpack, and babel. I'm also using bulma on the UI to see what it's all about. When a movie title is entered in:
Now I just have to wire up localstorage (or sessionstorage, idk yet) to cache the data to prevent calling the api too many times. Here's the solution to my problem for anyone in the future: ORIGINAL POST BELOW I'm using React/Redux/React-Router/Node I'm unable to dispatch fullDetailArray, am I hopeless? [link] [comments] | ||||||||||||||||||||||||||||||
Posted: 05 Jan 2018 11:26 AM PST I am building a project that needs to integrate a database and that needs to share the data across multiple devices. Would a website or a program work better for this application [link] [comments] | ||||||||||||||||||||||||||||||
Posted: 05 Jan 2018 11:09 AM PST I need to do some operations on a 40 digit number. Its stored in SQL which says no thank you, won't fit in my 38 precision limit. The only other language I know is C# which also says no thank you. Any ideas? [link] [comments] | ||||||||||||||||||||||||||||||
Which languages should I learn for my app? React or Swift/Java Posted: 05 Jan 2018 02:46 PM PST I've decided to develop a mobile application. So far, I've only built apps with Python (Django), PHP. I have zero JavaScript knowledge. My App has the following requirements:
And app that comes with similar features is Tinder/Deliveroo/Uber. My choices are, and I am a complete beginner (zero) in all of them:
I understand that React Native might be better because it allows to develop for both at the same time, but I read that functionality is limited compared to Native Development. However, is it a better choice for my type of project? Does it work for my requirements? Which one should I pick, I would like to hear Pros and Cons of each e.g. learning curve, speed of development from 0 to app, set of features, debugging and future proof. I would like to stop deciding and start developing, but both seem like good options to me. If you were to start fresh again, which one would you pick and why? [link] [comments] | ||||||||||||||||||||||||||||||
Is there a GUI framework that lets me specify layout constraints as linear equations? Posted: 05 Jan 2018 10:36 AM PST Because that would be awesome. Probably extremely slow, but nevertheless awesome. [link] [comments] | ||||||||||||||||||||||||||||||
I want to sort some data on a website Posted: 05 Jan 2018 02:22 PM PST So basically, I try to keep an up to date list of my friend and I PC specs. Right now I keep it in a Google Sheets Spreadsheet (yes it has weird stuff, don't mind it), but it is a PAIN IN THE ASS to update (and use anyway). I'd like to make a website, that once done, will make it easier for me to edit people's specs and add other people too. A sorting system could be nice, but I can do without it. Sadly, I don't really have much experience with programming, but I am definitely willing to learn. I know this might be asking a lot, especially since I'm only a beginner. Where should I start? [link] [comments] | ||||||||||||||||||||||||||||||
Resources for Architecture and Data Structure of Activity Feeds / Timelines Posted: 05 Jan 2018 02:12 PM PST I've got a simple PHP / MySQL / Angular app that I'm looking to add an activity feed for. I was surprised not to find a whole lot of documentation on ideas for architectures for this out on the internet - there were a lot of "things to think about" but not so many implementation ideas. My users are in small-ish groups of people that range from typically 2-3 people up to max of 20-30 in the very rare cases. Implementation needs to be scalable to N number of groups. The general ideas that I've come up with are (in no particular order):
Any other ground breaking ideas or guidance out there? [link] [comments] | ||||||||||||||||||||||||||||||
Is Unity still the best route for developing cross platform mobile AR games? Posted: 05 Jan 2018 02:12 PM PST I've seen ARkit for iOS but Google's ARcore supported device list is so small doesn't seem worth implementing it yet. Is it better to just use Unity currently to develop for both platforms? Or is there a better alternative? [link] [comments] | ||||||||||||||||||||||||||||||
Posted: 05 Jan 2018 02:08 PM PST Hi. I'm new to learning SQL and I'm trying to create a SQL query that selects the P's of rows that satisfy the following conditions:
The table I have is: Table Name: Trial
I am trying to select 1, 4, and 5. I have tried something like: SELECT a.P FROM trial as a, trial as b WHERE a.q1 = b.q1 and a.pos1 != b.pos1 and a.pos2 != b.pos2; But I would get the selection of 1, 2, 4, and 5. However, 2 is an invalid choice because it shares the same pos1, pos2 pair as P 3. Do you have any tips for this question? Thanks. [link] [comments] | ||||||||||||||||||||||||||||||
Posted: 05 Jan 2018 12:20 PM PST hey guys im trying to learn code, and i find a dude on youtube how to make a website and now im stuck though i followed the instructions. hope you guys can help. Thanks you on before hand it some CSS: @import 'https://fonts.googleapis.com/css?family=Alegreya+Sans';
img { display: block; margin: 0 auto; max-width: 100% height: auto; width: auto; margin-bottom: -4px; } wrapper { } banner-wrapper { } header { width: 100% height 100px top: 0; left: 0; } logo{ } nav { float: right padding: 25px 20px 0px 0px; } menu-icon { } ul { list-style: none; } nav ul li { font-family: 'Alegreya Sans', sans-serif font-size: 150%; display: inline-block float: left padding: 10px; } [link] [comments] | ||||||||||||||||||||||||||||||
Short-lived instances of Python server? Posted: 05 Jan 2018 11:52 AM PST Hey all, I'm pretty new to web/cloud computing, and I'm having trouble figuring out/deciding how to architecture the side project I'm doing. I recently built a website for myself hosted on AWS using the tutorial found at https://serverless-stack.com/ (and obviously customized it a bit). I also wrote a "minichess" bot during my last term of school. I'd like to host it so that people that visit my site can play against the bot. Vaguely, I think my solution is short-lived socket servers that can kill themselves based on a timeout, in order to avoid unnecessary server time. Here's where my lack of knowledge comes in: 1.) Is there a way to do this with AWS so that instances of my website can dynamically connect to instances of the chess bot? 2.) Would it be better to just create a monolithic server and try to implement multiple games/connections through multi-threading? Or is there some other option that would work better that I'm not seeing? There's also a version of the bot in Java which I could work with if that makes any part of the process easier. [link] [comments] | ||||||||||||||||||||||||||||||
[HTML] How to load bootstrap css properly? Posted: 05 Jan 2018 11:52 AM PST Essentially I'm trying to make a personal website and a lot of this is new to me. I did use freeCodeCamp for some stuff but what I'm essentially doing now is making sure I can load one properly before working on it http://getbootstrap.com/2.3.2/examples/carousel.html# I downloaded the html from the site (used inspect element) and used the bootstrap they had available to download as well Here's my project structure (the parent directory is called bootstrap): https://i.imgur.com/biqQBwH.png Here's what it looks like when I load index.html: https://i.imgur.com/pdMVnTr.png I thought it might have something to do with the css preprocessor, but I'm really not sure [link] [comments] | ||||||||||||||||||||||||||||||
What do you do to get unstuck? Posted: 05 Jan 2018 05:40 AM PST When you have difficulty solving a problem what do you do? Is there a process you have to think about something else or think about the problem in another way? Do you take a break? What do you do when you take a break? [link] [comments] | ||||||||||||||||||||||||||||||
Posted: 05 Jan 2018 10:52 AM PST Using too much data on my android phone. .2 Gb a day, just browsing reddit and opening gifs and articles. Blocked youtube in hosts just so I don't accidentally load anything. I don't load ads. Is there a way to block gifs if they're over say a Mb? Or other ways to block the heavier parts of sites? [link] [comments] | ||||||||||||||||||||||||||||||
Posted: 05 Jan 2018 09:53 AM PST Budget creator. So it will take in information like income per month, then I can split it down to bills, rainy day fund if it doesn't already exist, then to things I want (pc parts, car, etc...) Each thing should have a percentage bar that can be increased/decreased and give back information. Thanks for your time. [link] [comments] | ||||||||||||||||||||||||||||||
Posted: 05 Jan 2018 08:37 AM PST NOTE :. don't scared by its length most of it is just the output in the end. NOTE: plz copy this code into your favourite editor, as I have lots of comments : and it looks cumbersome. file Car.java. file AddCarRecord.java. file ReadCarRecords.java. execution - output - - **see all set to default values when I am reading the records **. [link] [comments] | ||||||||||||||||||||||||||||||
What is the convention on where to write new functions? Posted: 04 Jan 2018 11:26 PM PST If I have a main function that calls Func1, where should I declare Func1? Above or below my main function? I've seen different video tutorials do it both ways. What is the convention? [link] [comments] | ||||||||||||||||||||||||||||||
Posted: 05 Jan 2018 04:02 AM PST I have the following function All it`s supposed to do is compare a String of 2 characters and return true if it matches a Roman number with 2 digits. However, it never returns true, here is one of the results I got with debug console output: [link] [comments] | ||||||||||||||||||||||||||||||
How to create Background applications? Posted: 04 Jan 2018 10:58 PM PST I recently got a new mechanical keyboard and it has a ton of nice and shiny new buttons! There's just one problem, I use Linux and the software for the keyboard is Windows only. Actually, every button works on my computer except there is a timer button. I think it's pretty neat idea and I want to be able to use it. So, I've decided to make my own timer software to use this button with, but I have a few things to iron out that weren't very easy to google the answer. I would want to not necessarily have this piece of software running ie forget to open/background the app and the button doesn't work. I don't have a good idea for how to do this. Like the original software developed for the keyboard has a setting window where you can configure the timer and a few other aspects. Then you can close that application and when you press the timer button it starts and when the timer is over your keys backlight flashes. I just don't know how to create this. Any Ideas? [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