• Breaking News

    Tuesday, May 8, 2018

    Streamed myself developing an app in 28 days to show people that you can build anything with passion, motivation, and a little bit of luck. Say hello to SimpleAlerts. My take aways from this project. learn programming

    Streamed myself developing an app in 28 days to show people that you can build anything with passion, motivation, and a little bit of luck. Say hello to SimpleAlerts. My take aways from this project. learn programming


    Streamed myself developing an app in 28 days to show people that you can build anything with passion, motivation, and a little bit of luck. Say hello to SimpleAlerts. My take aways from this project.

    Posted: 08 May 2018 06:07 PM PDT

    Hi everyone!

    I want to preface this post by stating that I am in no way trying to self promote something I have made. While I think it would be awesome for people here to check it out and use it, I wanted to post about my experience with creating an application in 28 days and hopefully motivate someone else to do the same.

    About SimpleAlerts

    As the title states, I streamed the entirety of my work for this project on Twitch. I have always been enthralled with the concept of Twitch and I really thought it could be an incredible place for programmers to showcase their work. This led me to start a stream that would encourage people to get involved with programming. I have almost three years of experience working with web development, mobile development, and I am mostly self taught. I still have much to learn and I believe the best way of doing that is through projects. This is where the format for my stream comes- start a project from start to launch in 28 days. This is how SimpleAlerts was born. SimpleAlerts is an open source project that is here to solve the problem of unreadable, disorganized stream events through Streamlabs. For much more detail on this feel free to head over to the repo as it has much more information about the project.

    Learning Points

    As someone who started off his programming career truly through internships and hackathons, I know how intimidating it is to begin your programming journey. This is why I think this style of project is a great way get a deep dive into something that you have been really wanting to try. I wanted to list the benefits I got from this no matter what level programmer you may be:

    Learning how to properly setup your project beforehand is KEY

    • This is something I have been really wanting to get into as I have always struggled with it. The way you tackle massive projects/problems all comes down to the initial setup. Take as much time as you need in order to really understand how you will be doing each step of the application. It will save you tons of time in the long run.

    Keep every task bite sized

    • I am a huge advocate of Github Issues (as you will see if you check out the repo). It is much easier for me to digest tasks if they are written out in bite sized concepts. I feel this is a practice many people lack. They feel as if they need to tackle huge problems at once. You don't! Your code will be there tomorrow, I promise :)

    Set a deadline and be consistent

    • This take away I think is really important. Many projects that are started are never finished. This could be the shear amount of features that you may want to implement or you've simply lost your drive. I had two main motivating factors when building this project. First was the 28 day timeframe and second was the fact that I set a stream schedule 5 days a week for 2-3 hours a day. This kept me engaged with SimpleAlerts.

    It's okay to struggle and not be perfect from the beginning

    • You are going to mess up and do things wrong. That's okay! As you start building more projects things will start to click. This could even lead you to refactor older projects with this new insight!

    Be proud of your work even if only one person uses it

    • It's okay that your application doesn't pop off-most don't. Just take a look back at all the time you spent and how much you learned from building out an app from start to launch. These projects are always beneficial even if you don't make millions of dollars ;)

    I wanted to wrap up this post by saying that the programming community is a great one to be a part of. All the people I have interacted with during this project have been more than great. Everyone is willing to help each other out and want to see everyone succeed. If you are afraid to start something like this or even start programming, just remember people are here to support you. One of the reasons why I decided to make SimpleAlerts open source was to encourage beginners to come and add to the codebase. Consider contributing on Github @ this repo if you are interested!

    Thanks for taking the time to read this and if you have any questions/concerns please feel free to reach out :)

    -Alec

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

    Learn Enough JavaScript to Be Dangerous (A Great Introduction to JavaScript)

    Posted: 08 May 2018 09:25 AM PDT

    Hartl's introduction to JavaScript is fantastic, it's also free, there is an online portion you pay for to get screen casts and the ebook. But if you're just interested in learning about JS, take a look.

    Learn Enough JavaScript to Be Dangerous

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

    Algorithms

    Posted: 08 May 2018 04:31 AM PDT

    Generally speaking what is a good set of algorithms to learn?

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

    [Python] How can i find the mode of a dictionary?

    Posted: 08 May 2018 10:28 PM PDT

    Im currently doing an assignment where i need to find the mode (most frequent item) in a dictionary. I already created a method that initializes the value of each key to be 1, and increases its value by 1 each time it is repeated. For example, in dictionary containing the keys {1,1,2,3}, the key '1', would have a value of 2. I already ran some tests using the print function and this piece of code is working as intended. The next step was to run the max() function on the dictionary's values to determine which one is greatest. The problem i've ran into is that some of my keys have the same value. For example the keys '2' and '7' both have a value of 3 when ran on the test program, but the max() function only returns the '7' key. I need to be able to return both of these keys and append them to an array called modes[]. This is what i have so far:

    def mode(data): dictionary = {} # Part 1: # Update dictionary so that each dictionary key is a value in data and # each dictionary value is the correspinding number of times that value occurs: for item in data: if item in dictionary: dictionary[item] += 1 else: dictionary[item] = 1 print("dicitionary contents: ", dictionary) # Part 2: # Find the maximum of the dictionary values: maxTimes = max(dictionary, key=dictionary.get) print("max value: ", maxTimes) # Part 3: # Create a list of the keys that have the maximum value: modes = [] for item in dictionary: if item == maxTimes: modes.append(item) # Part 4: # If no item occurs more than the others, then there is no mode: return modes 
    submitted by /u/Zelnz
    [link] [comments]

    How to convert XML file to JSON Object in Java?

    Posted: 08 May 2018 09:23 PM PDT

    I have an xml file, I want to convert it to json object using Java. Please help me?

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

    Does Java ever get better?

    Posted: 08 May 2018 11:17 PM PDT

    I'm a student currently working toward my CS degree. It's a fast-track Associates (too many particular life situations to aim for a Bachelor's right now, but that's for another time). I won't be doing anything over the summer so I plan to just absolutely throw myself into the programming world at that time.

    Anyway, I'm currently at the end of my first (and maybe last) semester of Java and I've learned that I absolutely hate, hate, hate, and finally can't stand this language. I've done c++ and Python and so far this language has been nothing but a confusing, drawn-out, non-intuitive, hair-pulling mess. I'm doing well in all my other classes but I'm struggling to pass this one (partially because the tests are not open-book or open-note and the Java language is so stupidly long for everything you do).

    I've been trying to figure out how to read a file into an array for a while using a separate class from main (and without any input/processing/output from main) and I'm totally stuck. I've done it in Python, which according to everyone I've ever spoken to is a "baby language," but hey, it worked. But in Java I've had a hell of a time trying to figure it out, and unfortunately my instructor hasn't been helpful at all (basically here's a lab on it, use the book to figure it out, he doesn't discuss actual syntax in class).

    So to quit beating around the bush, my question is: if I can work my way past this wall of negativity, does Java ever actually become fun to work with? Should I press on, or would I be ok just focusing on what I'm doing better at? I love c++ and Python, but this entire semester has just been a drag with Java. Maybe it's my professor, maybe it's me, but I'm hoping there's a bright side.

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

    I'm learning c# after learning python. How can I do "for len(range(n)): ..." in C#?

    Posted: 08 May 2018 10:49 PM PDT

    I'm currently writing a program where every time a certain event happens an integer N is += 1. I then run an if statement to check if N is even or odd using the modulo. Depending on which it is, a for loop will run that will change the value of another variable X. The amount in which variable X changes depends on the value of n. In python I would have accomplished this by going "for len(range(n)): blahablahblah". But I can't seem to figure this out in C#.

    Any advice?

    submitted by /u/Math-Code-Love
    [link] [comments]

    What is the point of using "let" instead of "var" in Javascript?

    Posted: 08 May 2018 04:30 PM PDT

    Specifically, when you first define a variable outside of loops, if statements, functions, etc. I see lots of tutorials use "let" instead of "var" to define a variable, but there seems to be no difference.

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

    Need Help on improving my learning and mastering

    Posted: 08 May 2018 10:14 PM PDT

    Hello, I started programming with java since I was in high school, then C++, C then I kinda lost interest. I have a Bachelor's degree in Electrical Engineer , but because I regret going into that field and cannot find a job, I'm now back to programming to add on my resume but in Python. A year ago I started Python, and it seems there maybe something wrong with my learning curve and that it may hold me back on doing projects and help me prepare for job interview.

    I understand there are alot of project ideas out there, but a lot of people suggest to do a project I want to do. The problem is that I don't have any preference or don't get excited about projects other than just follow what others do. I have python crash course, automated the boring stuff, and "Complete Python Bootcamp from Udemy'. Because I don't know what programming field to aim for (data science, full stack, QA automation etc.), should I just do random projects (reddit, books) out of interest and hope they click, or I'm just wasting time?

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

    Git: How to merge my branch onto a remote server that isn't master?

    Posted: 08 May 2018 09:57 PM PDT

    Sorry, I know Learn Programming doesn't really like Git questions, but I've Googled and asked in a bunch of other places and still have not been able to figure this out. I am slowly working through a tutorial, but really don't understand much yet.

    I have 3 environments I am working on (4 if you include local): 'dev', 'stage' and 'live'.

    Obviously the code I am updating is drawn from 'live', so that's 'master'.

    I've made some changes to a file (I've been able to create and commit to a pull request fine) and wish to put the code on the 'stage' server (I don't know what if the correct terminology here is 'push' or 'merge'). I am unsure how to do this and all my attempts thus far have not worked. Here's what I have gathered from online resources and have attempted but failed:

    Attempt 1

     git checkout my-branch git pull origin master git push git checkout stage git pull git pull origin my-branch 

    Attempt 2

    git checkout stage git pull origin master git checkout my-branch git pull origin stage git push 

    Attempt 3

     git checkout stage git pull origin master git checkout my-branch git pull origin stage git merge stage 

    Honestly, it feels that every resource I read seems to have a different interpretation and none fit my circumstances so I path together a bunch of stuff I don't really understand.

    Would someone be able to describe how I should do this?

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

    How do you guys feel about Udemy courses?

    Posted: 08 May 2018 12:12 PM PDT

    I'm a 24 year old college drop out trying to change my life. Focusing on front end Web Development I've done some Khan Academy and like it so far. I have heard people recommending colt steels Web Development course on Udemy and was wondering how this sub feels about them. (Also open to other udemy suggestions and even other sites!)

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

    Just got my first coding gig - questions about the next one

    Posted: 08 May 2018 07:36 PM PDT

    I'm a self-taught programmer and I finally landed a full-time job doing Front End Web Dev. I'm very happy about the job. The pay is 90k/year. I'm happy with that for now, but I want to know what exactly should I be doing if I want to go for jobs that pay ~150k in a year's time. a) I'm working in React on this job, so maybe become a React specialist? I can't quite tell what the salary max is for that kind of role. b) Continue to study CS fundamentals and algorithms so that I could be competitive with interviewing at the big companies (Google, Amazon, etc.). I take it that starting salaries there are much higher. c) Become a machine learning specialist? (These jobs also seem to have higher salaries.)

    Any other ideas? I'm just starting this new career and my goal is to "move up" (at least in pay scale) as quickly as possible, but I don't have a good plan in mind.

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

    Where do I find out about the latest cutting edge software tools?

    Posted: 08 May 2018 02:57 PM PDT

    I'm talking about things that are on the verge of being released or already released but are still relatively unknown like Flutter or Operator.

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

    How to handle inter-dependency/ circular dependency in Visual Studio(C++11)

    Posted: 08 May 2018 09:50 PM PDT

    I'm trying to create header and class files for two interdependent classes. I tried using #pragma once, extern class declaration, declaring classes in each other's headers. None of them seem to work. Here's my sample code:

    A.h

    #pragma once #include "B.h" class A { private: int num; public: A(); void printB(B b); int getA(); ~A(); }; 

    A.cpp

    #pragma once #include "stdafx.h" #include "A.h" #include <iostream> A::A() { num = 5; } void A::printB(B b) { std::cout << "b = " << b.getB() << std::endl; } int A::getA() { return num; } A::~A() { } 

    B.h

    #pragma once #include "A.h" class B { private: char ch; public: B(); void printA(A a); char getB(); ~B(); }; 

    B.cpp

    #pragma once #include "stdafx.h" #include <iostream> #include "B.h" B::B() { ch = 'g'; } void B::printA(A a) { std::cout << "a = " << a.getA() << std::endl; } char B::getB() { return ch; } B::~B() { } 

    Interedependency.cpp [Entry point/ Main file]

    #pragma once #include "stdafx.h" #include "A.h" int main() { A a; B b; a.printB(b); b.printA(a); return 0; } 

    How to handle such interdependent classes in Visual Studio?

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

    Keep receiving std::bad_alloc error when trying to return the data of an item in my Dictionary - C++

    Posted: 08 May 2018 09:34 PM PDT

    //! Returns the data for the item, given some key. template <typename TK, typename TD> TD& HashTable<TK,TD>::GetItem( const TK& key ) { int index = GetItemIndex(key); if (index == -1) { // GetItemIndex returns -1 if item is not found throw runtime_error("Item does not exist in table!"); } else { TD datastuff = m_data[index].data; return datastuff; } } 

    Here is my function. Every other function I have made in this assignment is passing all tests but this one. In this one, I expect the function to return the data "Osira". As I step through the debugger, just as I reach the line of code that says "return datastuff", my value for datastuff is indeed "Osira". However, once I actually step "into" that line of code, somewhere along the line it appears that value gets deleted(?) and I eventually receive std::bad_alloc error before exiting my GetItem() function.

    I'm really hoping this is a silly error. This has been a week of very little sleep and I've been working all evening on this. I would love a second set of eyes here, and If I need to provide anymore info I would be happy to do so.

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

    Is NPM heavily use in real world tech jobs/firms?

    Posted: 08 May 2018 03:28 PM PDT

    Is npm the primary way employees share JS files in real world jobs or do you guys use other ways? Thanks

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

    I have one hour free for coding every day, what to do?

    Posted: 08 May 2018 09:14 PM PDT

    So I've been in a CS course for 2 years now but as college focus much more in concepts and math (which of course is always useful) I think my knowledge in problem solving and technologies (javascript, ruby, go, docker,...) is not as good as I'd like.

    So I decided to spend 1 hour every day doing something in order to get better at those things, beginning with problem solving. I'm going to try and solve one competitive programming problem every day (in 1 hour).

    What do you guys think? Should I be doing something else? Is It better not to study for a couple of days and then sprint it once or twice a week or should I remain consistent (less time but daily practice)?

    I was inspired by "30 days of code" which is a coding challenge in which you learn something everyday for 30 days in a row. Do you guys know other challenges like this one?

    I'd love some suggestions. Thanks in advance :)

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

    Learning Perl

    Posted: 08 May 2018 01:29 PM PDT

    Hey guys!

    So I'm currently in the running for a pretty big new work position, but I have no experience in working with Perl outside of working with cPanel perl scripts.

    I was curious if there were any recommendations for books or any other resources to get some experience in it? Most of the time I will do as I normally do and google and learn as I go :P But I'm trying to get as much in as I can prior.

    Any recommendations would be great!

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

    [C++] Explain to me like I'm 5. Pausing code during execution with System(Pause) and Cin and Shell Programming

    Posted: 08 May 2018 02:51 PM PDT

    So I've been learning/practicing C++ for about 5+ years now and I've have a couple questions involving pausing programs in the console waiting for user input.

    A few hours ago, I found some comments stating that there isn't really a best way to do this. I was told long ago that

    system("pause");

    isn't good because it's a type of C++ code that only Windows supports. So I was told use cin statements instead like

    cin.ignore().get();

    Earlier today, however, I read that having code that pauses and waits for user input in general is bad because of reasons like if it's being ran as a part of a pipeline in a shell and that instead I should configure my IDE (VS 2010-2015) to not close the console window right away.

    I really don't know what this is suppose to mean. How is it that having a program wait for user input can all of a sudden be bad?

    Also, why is it that

    System("pause")

    is exclusive to Windows?

    Lastly, what exactly is Shell Programming? I heard about it in context to the above issue but I never heard of it before.

    EDIT: Corrected the syntax

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

    Recommendations for creating a question bank WebApp

    Posted: 08 May 2018 02:50 PM PDT

    I'm not that new to programming but completely new to web development and as a first 'big' project I would like to create a question bank similar to UWorld (obviously much more basic). Has anyone of you resources that you would recommend or maybe even personal experience with such a project? I've done general WebDev courses so I'm looking for anything more specific to this project. Thanks for your suggestions!

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

    Code, Save, Compile, Run: Disk usage

    Posted: 08 May 2018 08:11 PM PDT

    Typically, my programming cycle consists in typing some code, saving the file, compiling it and then running.

    Does tweaking small things, and then saving again, compiling again, several times, wear out the drives, because of all the writing that has to be done? Should I be concerned about this? What can I do to minimize it? Is it different in SSDs/HDDs?

    Thanks

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

    MongoDB ISO Date Performance question

    Posted: 08 May 2018 02:09 PM PDT

    when i insert a ISO formatted date as a string from java it looks like "2012-01-20T18:38:00Z" when viewed in mongo console and compass.

    I parsed it into a Date object and it looks like 2013-03-28 21:54:00.000 in compass and ISODate("2013-03-29T01:54:00.000") in mongo.exe. Filtering by $lt and other things still works for both versions though. Is there a performance boost by using the Date object over the string Iso object?

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

    Make a front end interface for C++ code

    Posted: 08 May 2018 01:59 AM PDT

    I have written a C++ program.So far I have been taking inputs from my terminal interface and writing outputs to files or the terminal screen. Turns out I need to include some sort of graphical front end. No idea how to go about this. As far as I understand from googling ,writing a front end in C++ is not recommended. Hoping someone can help me out?

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

    Sending email from web page

    Posted: 08 May 2018 04:06 PM PDT

    So I am starting to transition from application development into web development. I have created a website where a user can fill out a form and then hit submit. Once submit is clicked, the information from the form is to be emailed to a designated email address. My question is:

    Is php the best way of doing this? If not, what are your recommended languages/methods?

    Thanks in advance.

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

    Working through Brackey's coding lessons (Stuck on episode 11/15)

    Posted: 08 May 2018 07:37 PM PDT

    I'm on the inheritance episode (Link opens to exact second) and everything has gone fine up until this moment.

    I try to run the program after writing in all the new classes, but an error at the pops up saying "Program does not contain a static 'Main' method suitable for an entry point."

    To me it's saying that there's no Main class but after trying a few new solution files and pasting the stuff in, it's still not working.

    Nothing has gone wrong up until this point and I'm pretty confused.

    Also if there's a different program than Xamarin studios that I could use PLEASE tell me. Jesus christ this thing is bad.

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

    No comments:

    Post a Comment