• Breaking News

    Saturday, July 14, 2018

    Learning how to use git (or really, any version control) has the best difficulty:benefit ratio of anything a beginner can learn. learn programming

    Learning how to use git (or really, any version control) has the best difficulty:benefit ratio of anything a beginner can learn. learn programming


    Learning how to use git (or really, any version control) has the best difficulty:benefit ratio of anything a beginner can learn.

    Posted: 13 Jul 2018 09:06 AM PDT

    What I mean by the difficulty:benefit ratio, is that while git can be a complicated tool, most people won't need 90% of it and you can learn enough of it to do something useful in just a few hours (and pick up the more obscure knowledge as you get experience and learn about best practices).

    The first commands you need to learn are:

    git init, clone, status, add, commit, push/pull.

    And there's no reason you can't learn that today. Then if you're feeling crazy just learn about branches and forks.

    There is seriously no excuse for a professional programmer to be emailing a bunch of zip files named sep_2_tuesday_v3.zip back and forth. It is such a huge nightmare when a second programmer starts working on it, or you broke something and can't remember what you changed. Or if you both changed it and now you have to sit there and consolidate your changes.

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

    What are persistent projects that you always do when learning a new language?

    Posted: 13 Jul 2018 09:17 PM PDT

    When I learn a new language, there's generally three projects that I always do:

    1. A naïve prime number finder. I find that this is a good introduction to a language. It's simple, but requires looking at least into how to do math operations, including sqrt.

    2. Conway's Game of Life. This is always great. It can be done in a console using ASCII Art, or can be expanded into "real graphics" when you're ready. It forces you to consider grid/matrix manipulation, and allows for increasingly difficult, but accessible optimizations.

    3. A math Tamogotchi clone. This is fun because it allows you to think about simulating time. If I create a game save at 9pm, and it's loaded at 9am the next day, how much time has passed? What has happened to the pet in that time? I also added a mechanic where instead of just pressing a button to feed, you answer basic math questions. It actually made me better at simple math just by testing it. It also helped me develop my thinking around general user input, menus, saving and loading states, and proved to be a challenging project to port to a full GUI.


    I can't be alone in having "pet projects" that you have a tendency to try and build on.

    What do you do?

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

    Can someone share a place where there are a lot of beginner programmers collaborating on projects?

    Posted: 13 Jul 2018 01:33 PM PDT

    I have a new laptop and I forget the name of a group where there were like 6k people in..

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

    Help Wanted Python Open Source Project - Easy Easy

    Posted: 13 Jul 2018 11:20 PM PDT

    I have started a repository that I intend it to be a collection of good resources for crafting Python Skills from beginner to advanced and WOULD LOVE HELP FROM THE COMMUNITY. As there is much more to software development than just coding, this is a good opportunity to flood the repo with contributions! I am willing to mention every contributor on there!

    https://github.com/RafaelBroseghini/PyPractice

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

    C++ GUI?

    Posted: 13 Jul 2018 10:19 PM PDT

    Hello world! I have been going to college for a degree in computer engineering and have had a lot of classes involving programming. I definitely have fallen in love with programming and how interesting, challenging and fun it is. I have learned a lot about many programming languages. One thing that bothers me is no class has even touched on GUI's at all. I have no knowledge of how they work but I want to learn all about them. Where is a good place to start? I'd prefer to program in C++, it's probably my favorite language. Any good YouTube videos/forums/books? I appreciate any help I can get!

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

    I'd like to pull a variable value from inside a running application into a python script, how can I go about doing this?

    Posted: 13 Jul 2018 09:41 PM PDT

    Ok, so the scenario is that the circuit for my heated bed for my 3d printer broke (MakerSelect v2.1), but I have setup a raspberry pi that can turn the heater on and off. Problem is that I need access to the PID for the temperature measurements so that I can adjust when it should be turned off and on.

    I can access the PID through a software called pronterface, but I need to access this variable so I can base my calculations off it and trying to get the drivers working for shit without a workaround is going to much harder I think.

    My idea is that it would work like cheatengine that reads the memory address of the variable within the program and gives it, but in API form. Unfortunately I have no experience with it. Could someone help me?

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

    Understanding authentication and authorization

    Posted: 13 Jul 2018 03:33 PM PDT

    Hey everyone, This is a the first part of a two piece article I am writing about authentication and authorization. I felt compelled to write it because I felt so deeply confused when I was approaching this subject and while I was reading all these different sources, somehow something did not make sense to me.

    We start off at the very basic level of what is a session , and slowly build up to JWT and token based authentication. In the next article we will discuss what OAuth is, and how do sessions and client-side tokens fit in today's applications

    link

    edit : I want to thank /u/nutrecht for reminding me that simplicity equals elegance

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

    Python I dont know how to create a function? I dont think thats the right word.

    Posted: 13 Jul 2018 08:22 PM PDT

    Physical code:

    It would be like a; def roll dice between the numbers 1-6

    Build:

    Roll

    Ill explain. So I remember learning that you can insert a word into the build to make it return a list of things. In my computer science class we used a dice program. We then inserted the word into the build and it returned a number between 1-6. I forgot how to do that though. Im using Sublime 3 right now as well, how do I insert that "roll" word into the build and have it return the value?

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

    Discord Python bot, please help with run-time errors

    Posted: 14 Jul 2018 12:07 AM PDT

    Learned Python recently and decided to make a Discord bot as my first project. Starting off with a super simple function: logging in the bot and it greeting user. Below is my code:

    import discord from discord.ext import commands client = discord.Client() # Discord application token token = '270682530338832395' # bot commands prefix bot = commands.Bot(command_prefix = '$', description = 'A bot that greets the user back.') @bot.event # on-ready() called when bot has successfully logged in async def on_ready(): print('Logged in as') print(bot.user.name) print(bot.user.id) print('------') # bot commands @bot.command() async def greet(ctx): await ctx.send(":smiley: :wave: Hello, there!") client.run(token) 

    It throws the following run-time errors upon running the .py file. I'm clueless on what to do.

    Traceback (most recent call last): File "/home/USERNAME/PycharmProjects/DiscordBot/main.py", line 1, in <module> import discord File "/home/USERNAME/PycharmProjects/DiscordBot/venv/lib/python3.7/site-packages/discord/__init__.py", line 20, in <module> from .client import Client, AppInfo, ChannelPermissions File "/home/USERNAME/PycharmProjects/DiscordBot/venv/lib/python3.7/site-packages/discord/client.py", line 38, in <module> from .state import ConnectionState File "/home/USERNAME/PycharmProjects/DiscordBot/venv/lib/python3.7/site-packages/discord/state.py", line 36, in <module> from . import utils, compat File "/home/USERNAME/PycharmProjects/DiscordBot/venv/lib/python3.7/site-packages/discord/compat.py", line 32 create_task = asyncio.async ^ SyntaxError: invalid syntax Process finished with exit code 1 

    P.S. THIS IS ON UBUNTU OS

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

    [C++] Profiling tools, and methods?

    Posted: 14 Jul 2018 12:02 AM PDT

    Aside from the debugging tools that VS Community gives you, how else can I test my project for stability? I've monitored it for ram usage, processor usage, and have ensured memory leaks are plugged. What else can one do to profile a project?

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

    Please explain what React is like I'm 5

    Posted: 13 Jul 2018 01:09 AM PDT

    Just the general gist of it. What part(s) of the general HTML/CSS/JS flow does it simplify/automate/replace? Does it do back end stuff? Is it just a .js file you refer to like jQuery, or is it a big voodoo thing you have to set up on a server like Node?

    I'm kind of a thick one so I really do need it explained like I'm five. Thanks.

    Edit: Thanks so much for all the responses! I feel like I have a much better understanding now.

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

    Questions about library development

    Posted: 13 Jul 2018 11:04 PM PDT

    So, I'm new to making libraries, and somewhat new to libraries. I'm using MinGW and Sublime Text 3, I went back to VS2017 but it just looked cluttered and annoying when I went into it, so while I know it's got some features that make life easier, I like my text editor-console compiler set-up.

    What I wanna know is there a specific way to set-up your directories when creating a library so you can easily use it. Like a specific folder exclusively for .h files? Also when I compile my libary, I get a .a file, do I just need this and my header files to link with?

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

    Python or Java language !

    Posted: 13 Jul 2018 11:04 PM PDT

    Hello

    I want to know your opinion in the following subject

    Java is an old language

    Python is a new language that will rise and fly on the future (because it is easier to deal with and closer to logic)

    I am a beginner and want to learn a new programming language

    Which language do you recommend?

    While I prefer to be a professional mobile application programmer , But what about the Cordova language

    I also want to create ul / ux pages (I do not know what they mean or what languages are required to make those pages)

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

    How does a host treat its own fqdn?

    Posted: 13 Jul 2018 10:54 PM PDT

    upfront warning that i have a pretty limited understanding of sockets, drivers, network layers, etc...

    say i have a virtual host testserver.domain.com. on it i have some php that is set to access a mysql db. does the request get handled differently depending on whether or not i specify the host as "localhost" vs "testserver.domain.com"?

    the reason for the question, i have essentially this scenario at work right now where the virtual servers are on a kinda modified version of openstack. recently, there was a network drop and during that exact same time my php was returning a "connection refused" message while attempting to connect to the mysql db which is located on the same host. i currently have the hostname specified as the FQDN, not as "localhost". as soon as the network was restored, it was able to connect to itself again.

    any input is appreciated as always! feel free to point me to a better subreddit if possible.

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

    Learn C-Programming For Microcontrollers - Tutorials

    Posted: 13 Jul 2018 04:16 PM PDT

    I've created this website to be a free educational resource for beginners in Microcontrollers Programming, And in Embedded Systems more generally.

    https://deepbluembedded.com/microcontroller-programming-introduction-tutorial/

    If you're new to embedded systems, I highly recommend this article for you. Introduction To Embedded Systems

    Check out my website @ https://deepbluembedded.com/

    I'm releasing the materials of this series of tutorials on a regular basis. So stay tuned!

    Your feedback is the number-1 factor being considered for fine-tuning any upcoming content releases

    Good Luck ^^

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

    [C Programming] Skip all non-integers from a phone number input

    Posted: 13 Jul 2018 09:35 PM PDT

    Task: Write a program that accepts a phone number of the form +1(xxx)-xxx-xxxx where x is a digit, and displays the sum of all digits (x's) in the phone number.

    Issue: I've been unable to implement a code that can skip the parentheses and dashes included in the input. With the code below, I've only had success with summation of an input that excludes the non-integers (ie: 1234567890, rather than +1(123)-456-7890). However, if the user inputs a phone number that includes the parentheses and dashes, the programs stops after +1 and prints 1. I somehow need to get the program either to skip the parentheses and dashes or to ignore any non-integers.

    I've done quite a bit of research on break and continue loops, as well as arrays but these have proven unsuccessful during implementation (though, this could be due to my lack of knowledge). This is only the second assignment in the intro to C programming class that I'm taking and we've only just learned the basics of printf and scanf. The professor is anything but helpful. Reddit, you are my only hope. THANK YOU!

    Current Program (summation when the input excludes parentheses and dashes):

    #include <stdio.h>

    int main(void)

    {

    long phoneNumber, r, sum = 0;

    printf("Enter a phone number in the format +1(xxx)-xxx-xxxx: \n");

    scanf("%ld", &phoneNumber);

    while (phoneNumber > 0)

    {

    r = phoneNumber%10;

    sum = sum + r;

    phoneNumber = phoneNumber/10;

    }

    printf("The sum of all digits is: %ld\n", sum);

    return 0;

    }

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

    What are the disadvantages of using Angular/React?

    Posted: 13 Jul 2018 09:30 PM PDT

    I've heard a lot about why people should be using frameworks/libraries like Angular/React.

    So what are the disadvantages of using Angular/React compared to a traditional vanilla JS/jQuery approach?

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

    How to mouseOver "a certain color"? JS

    Posted: 13 Jul 2018 09:08 PM PDT

    I want to trigger an event when the mouse touches a certain color. How could this be done?

    I've learned the mouse event actions but can't figure out how to assign to a color. Help! Thanks. You guys are awesome here.

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

    Why is Python considered an interpreted language, but Java is considered compiled?

    Posted: 13 Jul 2018 01:22 PM PDT

    If both languages are compiled to byte code and then translated to machine code on the fly, why is one generally referred to as compiled and the other interpreted? I can't dig up any technical differentiations between the two, aside from the fact that the Python compiler is obscured from the programmer. Is that it?

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

    How Can I Get More Advanced in Python?

    Posted: 13 Jul 2018 08:21 PM PDT

    I just finished an introductory Python course at Community College, and found myself to be extremely interested. What can I do next to further enhance my skills?

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

    Coding Videos/Apps?

    Posted: 13 Jul 2018 07:55 PM PDT

    I'm brand new to coding and don't have a ton of computer time available in my household (one PC we all share), but I do have a decent amount of phone time available. Is there a decent app or video collection that I could learn from? I know hands on is the best, but I'd love to be able to take in some extra knowledge of I can. I think I'm leaning towards Python or Java to start, but anything is fine. Thanks!

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

    ReactJS and NodeJS

    Posted: 13 Jul 2018 07:20 PM PDT

    Im learning resctjs and nodejs, and i came across a question.

    I saw that node is based on non blockin IO, so, how about React? I dont know really if theres any connection with reactjs and node, i know that i use npm to run react apps, but, i can't run react apps in my terminal, so, theres no V8 locally in react, right? I'm kinda confused.

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

    What kind of projects does a Java developer work on?

    Posted: 13 Jul 2018 03:34 PM PDT

    I'm a student about to begin studying Computer Science in college and would appreciate the perspective of any experienced Java developers.

    What sort of projects do you work on (or have you worked on) at your job?

    I know Java and took the AP course for it, but I don't really know what you can actually do with it.

    Thanks!

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

    No comments:

    Post a Comment