• Breaking News

    Tuesday, February 4, 2020

    How to press on when you look at the hot mess that is your application and get utterly discouraged? Ask Programming

    How to press on when you look at the hot mess that is your application and get utterly discouraged? Ask Programming


    How to press on when you look at the hot mess that is your application and get utterly discouraged?

    Posted: 04 Feb 2020 09:38 AM PST

    I've been stagnating in the last few days, dropping from like a 3 hour average to half an hour of coding on my hobby project. It's because I didn't know what to do. How to name my variables, what stuff I even want or need.

    Today, I put in 4 hours, and seeing the literal diarrhea that I managed to write in the 100 lines of repetitive code with magic numbers makes me want to give up. At one point I planned to generate it all with loops and fancy agnostic modular functions, and have all the actual data safely stored in a global object, but then I thought that I would need some special cases and that it would be a waste of time, and now I really have a mound of crap that I can't even look at because it is two feet long and everything looks the same.

    Plus, what is even worse, I spent so much time on making my main menu all fancy and stuff, and now I am making sub-windows for options, and I'm just so dejected like the people I used to make fun of that say "if it works, it's good enough". So yea, my code works, but it look terrible. I only made this part so I can have a thing that can change values so I can make my save system to see whether it works.

    The worst is that all around, in js and in css I have random placeholder values written right into the variables, so good luck finding them and replacing them with the correct value later on. I wish there was an ide where you could write comments at the side, and not inside the code, and ways to switch quickly to a point in code. In atom, best I can do is hide a function, and then something gets messed up and all my collapsed stuff gets opened again and I have 1 billion lines in the css file that I have to collaps again so it looks ok.

    Oh yea, and I have a bunch of functions that I only use inside other functions, but I never put them in those functions because "I might use them elsewhere". Genius, right? Instead of putting them in, and then being able to collapse whole chapters of code.

    And you think I have one object with a nice hierarchy of random intermediary value-holding variables? Nah, I have 10 objects with 2 sub-variables each, so I can only find them with ctrl-f.

    Self-explaining code. Has anyone ever achieved this? Everytime I start something, it goes by the book, and then suddenly it spirals into the worst thing ever that I myself can't read, interpret, navigate, or salvage.

    Ignore this shit I'm going to get drunk now Bye

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

    Learning Java with a learning disability!

    Posted: 04 Feb 2020 02:10 PM PST

    Hi everyone,

    I'm Jay, I'm 25, and I have been diagnosed with PDD-NOS (a form of autism), NVLD (non-verbal learning disorder) and motor dyspraxia. I've got a BTEC degree (before uni but after high school) in IT & Business, and have a decent understanding of computers. I've always wanted to learn programming, Java and C# in particular, but I've always struggled with finding resources.

    The big "problem" for me is that I've always struggled to find resources that I fully comprehend. A lot of the tutorials online don't go into enough depth, or don't explain what they're doing at all, or what does what, which just leaves me frustrated and confused.

    When I was younger I'd force myself to try and keep with it, but I'd always end up quitting because I just didn't get what I was doing. I never got beyond the point of writing code from a book/what CodeCademy told me to write. I just feel that it's something that once I get what does what I won't forget, it's just getting over the initial hurdles that were seemingly impossible before.

    I've not attempted to keep up with it for a good 4 years now, and as I've done a lot of maturing, and learning how to learn and what works for me I feel motivated enough to once again attempt to learn programming.

    My question is: Are there any resources that are practical, in-depth, and don't overload you with information out there? If so, which would be the best? I wouldn't mind if it's in an entirely different programming language, just as long as I actually get it!

    Thanks a lot!

    submitted by /u/13thofJune19
    [link] [comments]

    Getting a job without a college degree?

    Posted: 04 Feb 2020 11:03 AM PST

    I have been programming for over 10 years now, but almost entirely in IDEs that have their own language (specifically mostly GML/GM:S). People and teachers I've had in the past have told me I'm a good programmer (Java, C++) with a very strong logic sense which its great to be reassured, but I'd like to get a job in the field as I currently work in IT. While I know the basic syntax and structure of Java and C++, I've never built a large project in either.

    What's are some good courses of action I can take to get hired as a programmer/developer? Is it necessary to have a git repo/portfolio in the languages I'm applying for? Or does code in any language help in getting hired i.e. are managers more concerned with logic sense than any specific language? Any and all advice appreciated.

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

    Managing separate Git repos in a multi-language project?

    Posted: 04 Feb 2020 06:51 PM PST

    Here's an outline of the project I'm working on:

    The MainProgram is a .NET application, programmed in C#. We manage it with a standard Git directory. All the editing here is done in Visual Studio 2019.

    The application has a plugin, plugin-interface which I wrote in Java to enable us to integrate some open-source Java plugins. Since Visual Studio doesn't support Java, I do all the Java programming in IntelliJ IDEA, use IKVM to turn the Java code into a dll file that the MainProgram can then use.

    I'm the only dev working on the Java side, so I manage this code in it's own directory and have a personal Git directory just for the plugin-interface so I can more easily track just the changes to the Java code.

    But commits are a slight hassle, as (aside from not having a proper builder to automate the java and ikvm compilation) whenever I make an update I have to do the following:

    1. Commit any changes in Visual Studio for MainProgram
    2. Compile the Java bytecode to a .dll file.
    3. Send the .dll file to the other contributor as were trying to keep binaries like this out of the Git repo.
    4. Manually move the updated Java plugin-interface code into its directory within MainProgram
    5. Commit (with SourceTree or Git bash) the updated project with all components in place.

    Is there an easier way for me to work on and manage version history for my Java code separately from the main project without updating anything in the MainProgram Git directory until I'm ready to commit all changes?

    Note: I've looked into Git submodules, they seem like they can get messy quick. I was considering adding all of the plugin-interface git files to the MainProgram's .gitignore, but would like some feedback first.

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

    Thoughts on complexity for building a business on outsourced physical devices for testing?

    Posted: 04 Feb 2020 10:19 PM PST

    So I really wanted to test an app on an iOS device and I'm aware of BrowserStack/SauceLabs/etc... but the pricing is nuts... it's like $#/month but it's billed annually like wtf... I can't pay for 10 minutes or something? I don't know... so you have this thing, where people plug in their phones(old spare ones) to a wall and they install an app that pays them to outsource it for automated testing. "What can go wrong". This concept isn't new I mean I was using this "help cure cancer" distributed computing thing you lent out your phone's processor for free. Willful zombies ha.

    It sounds super hard, I was just wondering about all the complexity involved, nevermind the security aspect(network connection/scoped access in device). But the remote access/recording/etc... It sounds like a neat problem but unfortunately I'm far from the native stuff at this time I'm using either PWAs or RN.

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

    Do people still print code?

    Posted: 04 Feb 2020 11:21 AM PST

    I was reading an old medium article which talks about printing code on Paper for debugging or just simply reading code. This idea does sound refreshing to me. Does anyone in this community prints code? Can you tell me any good tools/libraries to do that?

    Link to the medium post: https://medium.com/@tashian/print-out-your-code-on-paper-7c760a376bca

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

    How to know do I need React for a website?

    Posted: 04 Feb 2020 03:21 PM PST

    Is there a way to make an alert pop up with a message when i visit a site ?

    Posted: 04 Feb 2020 06:21 PM PST

    Help with quadratics equation solver

    Posted: 04 Feb 2020 05:59 PM PST

    Here is my code, keep getting the wrong answer. Any help would be appreciated.

    include <iostream>

    include <cmath>

    using namespace std; int main() { double a, b, c, x1, x2; cout << "Enter a, b, and c, which represent the coefficients in the quadratic equation: "; cin >> a >> b >> c;

    if (a == 0); { cout << "No real boot" << endl; } x1 = -b + sqrt((b * b) - (4 * a * c)) / (2 * a); x2 = -b - sqrt((b * b) - (4 * a * c)) / (2 * a); cout << "Root1 is " << x1 << endl; cout << "Root2 is " << x2 << endl; system("pause"); return 0; 

    }

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

    Advice to get started building a program

    Posted: 04 Feb 2020 11:23 AM PST

    I'm trying to figure out how to get started on an app I want to make. Basically, this app will be able to track poker home games with you and your friends to be able to keep records of stats and bragging rights. My final vision for this project is to be able to download it from the app store but I've never done any mobile development. I've really never done any kind of development. The only bit of programming I've done so far is java in Netbeans. My thought was to build it as a computer program first to get a usable final product and learn about java dev, and because that's all I know right now, but I was wondering if I should dive right into developing it for mobile. As you can tell, I'm a complete novice so any advice would be greatly appreciated.

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

    Is it easy to learn PHP?

    Posted: 04 Feb 2020 10:28 AM PST

    Is a position in QA a good start for a career in programming?

    Posted: 04 Feb 2020 06:23 AM PST

    Sorry if the title was confusing. I'm in the middle of a career-switch from education to ICT. I'm curious to know how relevant experience in QA would be if my ultimate goal is to become a programmer (e.g. frontend developer)? What are your thoughts? Thanks!

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

    Possible to enforce users/hackers must navigate web app using front end client app?

    Posted: 04 Feb 2020 07:10 AM PST

    i.e. preventing users/hackers from being able to log in & perform actions while impersonating a webapp client, using something like postman.

    Any way to do this? (cookies, hidden input elements seem detectable/spoofable).

    Or is this impossible due to the entirely spoofable nature of client-server HTTP communication?

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

    Fetching invoices from Quickbooks oauth 2 API with Python

    Posted: 04 Feb 2020 08:04 AM PST

    Hello, I'm doing a technical challenge that requires me to run a small python program to fetch the invoices in the dev sandbox on quickbooks. I've instantiated client, prepared scopes and got authorization url, but now I'm quite lost honestly. I have really gone into an API like this before and I have no idea what I'm doing. Can anyone lay out what my next steps are, or point me to some tutorials? thanks.

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

    Looking for Ideas for my Graduation Final Project

    Posted: 04 Feb 2020 09:09 AM PST

    I have from now until the end of the year to develop something new, its my "Final Paper" on my programming graduation, but i have no idea on what to do, do you guys can share some ideas with me?

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

    How to REALLY contribute to open source projects?

    Posted: 04 Feb 2020 12:41 PM PST

    When I google how to contribute to open source projects all what I get is how to make PR and fork project, but I fell this isn't enough to get you ready to contribute, no one tells you about the best practices that you should follow like always create new branch and name it with something you solved in the PR etc.. I was hoping for some resources or someone to share his knowledge with us, I would be so grateful.

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

    What file types can contain turingComplete compression in at most log * constant extra space than the best possible compression?

    Posted: 04 Feb 2020 12:31 PM PST

    For example, while I dislike the spaghetti-code design of perl syntax, a perl file is a solution to this as it has a binary "__DATA__" section after the perl code section, so that binary data could contain compressed instructions for more advanced algorithms and so on.

    A testcase is, for example, to compress the first n binary digits of PI or E. Such a file type would not tell the most efficient way to find better compressions, but if one was found, it would define the binary data format of it.

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

    Getting into front end development, yet have no idea about web hosting

    Posted: 04 Feb 2020 11:58 AM PST

    Good afternoon all! The subject says it all:

    I recently spent the last few months learning Javscript/Jquery/CSS/HTML/Bootstrap, yet when it comes to webhosting/setting the actual website up, I have no idea what the hell I am doing.

    Are there any good resources to get a crash course in it all? I'd much prefer to do everything by myself. And if you guys know - are there are any good webhosting options for small-time developers such as myself? What should I look out for particularly? What to avoid? Thank you.

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

    Custom Interval Random Slideshow

    Posted: 04 Feb 2020 11:14 AM PST

    Hello, please excuse my ignorance as I have no experience at all with coding but I'm considering looking into it to potentially tackle a (hopefully) simple problem I'm having.

    It would be a simple study tool for myself and maybe other artists to work from reference imagery shown for increasing time intervals. I want to make a slideshow populated randomly from a bank of images. The first image would display for one second, the second image for two, the third for three... etc. Preferably with a visual display of how much time remains on the current image.

    The idea sounds simple to me, but having no experience in programming I don't know if I'm just underestimating the challenge.

    Where would be a good place to start for this kind of project? I have heard of a few programming languages but don't know which one to dip my toe into the water for this kind of thing. Like I say, I know nothing!

    Thanks for reading!

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

    Needing help with accessing JSON in a C# application

    Posted: 04 Feb 2020 05:19 AM PST

    I'm building a C# application that interacts with a REST API. An example of the results I'm getting from this API is. So far I've been using RestSharp to interact with the API and Newtonsoft to deserialize it and have been getting a problem. When deserializing the JSON, I get the "Unexpected character encountered while parsing value" error. Using breakpoints, I looked into the contents of the response and saw that it is returning the full HTML of the FlagrantFlop.com website. I think the fact that the JSON being returned is inside the data array is causing a problem, so how can I access the JSON inside that array, and then deserialize it.

    Code: https://imgur.com/a/hfp4lqq

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

    How do we get whole coverage of longitude and latitude on each countries? (geolcation)

    Posted: 04 Feb 2020 06:32 AM PST

    I hope to get whole coverage of longitude and latitude on specific country. (every few km^2)

    I think geohash is one of the solution. But it's made by longitude and latitude.

    If you know any solution or hint, please let me know.

    It's not specific programming problem. (I think I will write this solution using Python)

    I just hope to know how do we implement.

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

    Is it wise to make an android application in unity?

    Posted: 04 Feb 2020 02:44 AM PST

    I have previous experience with unity and wanted to know if it is a bad idea to create a non game application on the platform. I know the best way to write an Android app is with Java or kotlin but it's been so long since I've written in Java that I don't feel comfortable writing a full application in it.

    Mostly just want to write the application in c# because that's my second goto language of choice behind python. Also the whole concept of having to deal with xml files puts me off.

    Would it be worth it if I just went with java/kotlin or is unity/c# good enough?

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

    SPF syntax help

    Posted: 04 Feb 2020 05:45 AM PST

    Hi all,

    I am getting a syntax error here, haven't done too much with SPFs before. Would appreciate some help.

    v=spf1 a mx ip4:54.85.70.106 include:a:dispatch-us.ppe-hosted.com include:spf.protection.outlook.com -all

    https://mxtoolbox.com/SuperTool.aspx?action=mx%3amypmsi.com&run=toolpage#

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

    No comments:

    Post a Comment