• Breaking News

    Monday, December 11, 2017

    What is your ideal way to learn programming? Ask Programming

    What is your ideal way to learn programming? Ask Programming


    What is your ideal way to learn programming?

    Posted: 11 Dec 2017 05:04 PM PST

    I am a programmer working on a social coding education website: https://coderpact.com

    Although there is a lot of existing educational content out on the internet, much of it is outdated and it can be hard to commit to long form content such as books or entire courses. My personal perspective as a working coder is that skilling up programming knowledge might be easier if some kind of social support system was available. Unfortunately the only robust options seem to be formal college courses which have their own issues. Would other programmers find value in P2P mentoring networks while trying to learn new or improve existing programming skills?

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

    Earning money with programming

    Posted: 11 Dec 2017 01:49 PM PST

    I have been programming for close to 5 years now with python (I can also program in JAVA and C) and and I enjoy making backend programs that usually deal with data manipulation. I am still in education and don't want to retract too much time away from studying, however I am wanting to earn a bit of money on the side to help support myself.

    I have tried looking on fiverr and other freelancing sites but they are very hard to intergrate yourself into and get jobs because their so crowded. Is there anyone who pays small amounts of money for programming in projects?

    Most the craze with programming currently seems to revolve around apps, but I don't enjoy making these; they seem to be more of a chore than a fun project to me. If anyone can help I would appriciate it

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

    Article says golang is bad for every high level task. What do you think?

    Posted: 11 Dec 2017 01:43 PM PST

    This is the article: https://medium.com/@ivanjaros/moving-from-php-to-go-and-back-again-9ea1f57018c4

    I was going to learn golang and i was going to use it mainly for web apps. This article suggest that this is a bad idea. I have read about a lot of web apps that were written in go though. So what do you think? Is the article right?

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

    [Software Planning] How much "process" do you impose on yourself in your personal projects?

    Posted: 11 Dec 2017 12:33 PM PST

    By "process" I mean what we generally consider the non-coding part of software engineering - documentation, requirements development, test procedures, etc.

    I work on mission-critical software in my day-to-day, so I'm used to extremely process-heavy software lifecycles. It's a pain, but it's also taught me the value of these processes, and how much time/effort they save later in the cycle.

    I'm trying to apply this concept to my personal projects, because I want to focus on adding cool features rather than chasing obscure bugs, but I'm having trouble finding a sweetspot between seat-of-my-pants cowboy coding, and super boring documentation writing.

    What level of process have you all found most effective?

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

    How long to learn enough Python/Javascript/whatever to pull and compare data from a JSON source?

    Posted: 11 Dec 2017 01:56 PM PST

    I have a (very) little experience with programming. Basically, I know enough to fumble around and make simple programs in Lua/Python, assuming I have time to figure it out.

    One of the games I play, Path of Exile, has a JSON api (is that how you say it?) to access items that players want to trade. I want to do the following:

    Scan the information for certain items (say, A, B, C, D)

    Log player names, and which items they have (Harry has 3xA, 4xB, 1xD, Betty has 10xD, Jane has 1 each of A and C)

    Sort the names by the number of items they match (for example, Harry has 3, Jane with 2, and finally Betty with 1)

    Spit out a formulaic message I can send (/w Harry Hey, I'd like to buy your A, B, and D for 1 widget each)

    Because I have no idea what I'm doing, I of course think that this would be simple as pie, but I want to double check, before I spend too much time beating my head against the wall. Could you go from struggling with, but completing, a FizzBuzz test, to doing something like this, say, within a week or so of spare time in the evenings?

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

    How do you make an HTML file in codeblocks? Just save as a .HTML?

    Posted: 11 Dec 2017 07:19 PM PST

    I just got done with an HTML & CSS class and now want to make my own website for my resume and projects. In class we used Mac's with Komodo Edit for creating HTML files that we saved and viewed in web browsers. I can't seem to figure out how to create one on CodeBlocks. Surely it's not a console application (program type)? Thanks.

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

    Propositional Logic - Natural Deduction

    Posted: 11 Dec 2017 07:06 PM PST

    Any prop logic and natural deduction knowitalls here?

    My final year project is to create an application that helps first-year students with their natural deduction studies by looking at their proof and telling them royghly where they went wrong.

    It let's them write their proof in the format <line no.> <proof line formula> <rule>

    I also have to give a presentation about this, and was wondering if any of you can give a rundown on prop logic and nat dud in general? And some tips for some possible random questions, like maybe real world applications of natural deduction?

    And if you have some more time, perhaps a good way to implement a program that can take a logic formula and generate a proof from this. So like some basic methodology of going about this?

    Thanks, my dudes.

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

    Could some one make a Key to Joy program for the Oculus rift controllers

    Posted: 11 Dec 2017 06:54 PM PST

    I have a vr Treadmill but it only triggers the W key so could some one make a program for when the W key is trigger it would emulate a button or analog stick on the Oculus Rift Controllers so when im in game with full locomotion i can trigger the move button in game

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

    Could someone give me a sentence about programming using a lot of jargon please?

    Posted: 11 Dec 2017 02:53 PM PST

    Hello! I'm writing an essay and my topic is about jargon. It means the usage of professional words which people who aren't specialised in that topic won't understand. I don't know much about programming but I do know that you guys use lots of difficult and foreign words

    Could someone write a sentence using a lot of fancy and difficult words that have to do with programming please? I'd really like to use it as an example sentence for my essay :)

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

    Fantasy Football Program, what language(s) should I focus on?

    Posted: 11 Dec 2017 06:38 PM PST

    I have an idea that would entail creating my own website for fantasy football and adding many new features that current services do not offer. I am wondering what languages I should focus on as I am still pretty green with programming though I have worked a bit with Javascript.

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

    Python Newbie question

    Posted: 11 Dec 2017 12:20 PM PST

    I've been working on Python for a little over a month now and I've noticed that Python seems to use a lot more memory when executing scripts (21mb and up). Is this normal?

    I am working in virtualenv so perhaps that has something to do with it, but it doesn't seem right. I'm limiting my imports. I'm kind of lost.

    Even the example script that memory_profiler has, shows that it uses a ton of memory. Maybe I'm just reading this incorrectly

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

    I'm starting a PHP development job with 0 PHP experience. What am I in for?

    Posted: 11 Dec 2017 12:11 PM PST

    I'm a mid level backend / embedded developer. Switched jobs, accepted a role as a developer where a lot of PHP is involved.

    I obviously want to be good at the job, what good resources can I read on PHP? Any pointers transitioning to PHP?

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

    YouTube autoplay (plugin?) help

    Posted: 11 Dec 2017 06:07 PM PST

    Hi, I have little to no experience in programming, but I have a small annoyance I'd like to solve.

    Basically, I want to be able to add songs to my youtube playlist from my phone and have it autoplay on my computer. But of course, the playlist on my computer won't update unless I manually refresh the page. I tried an auto fresh program but it ended up cutting off which ever video I was playing for a couple seconds while the webpage reloaded.

    I want to code a program or plugin that detects when the currently playing youtube video is finished and then proceeds to: 1. Refresh the webpage (Ctrl+R) 2. Skip to next video (Shift+N) 3. Fullscreen (f)

    Or, an alternative would be to code a plugin that will background refresh every minute or so and won't disrupt the current video playing.

    Again, I haven't coded since I was a kid, so I have no idea where to start on something like this. Any ideas or suggestions would be much appreciated!

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

    Scanner(System.in) problem. Why does it skip my .nextLine() call?

    Posted: 11 Dec 2017 06:03 PM PST

    Hello everyone,

    I'm having a bit of trouble with my scanner in a particular method in my program. When I call it the first time, it seems to work just fine. In the program, however, I want to allow the user to add up to two people if they wish. When I input the command to repeat however, it skips the first scanner input and does the second one. Here is my output:

    Welcome to Make U! You will be able to make a virtual human with your traits. Please answer the following questions...

    (1st run through the method. Note that the first scanner works just fine).

    What is your name? Only type in your first and last name: Joey Lingo

    How old are you? 17

    How tall are you (in inches)? 72

    What color are your eyes? Blue

    What are your hobbies, type just one here: Video Games

    Hobby added. Do you have other hobbies?

    If you do, type just one here (if you don't type "done"): Programming

    Hobby added. Do you have other hobbies?

    If you do, type just one here (if you don't type "done"): done

    What languages can you speak? Type just one: english

    Language added. Do you speak other languages?

    If you do, type just one here (if you don't type "done"): french

    Language added. Do you speak other languages?

    If you do, type just one here (if you don't type "done"): done

    Great! Your person has been created!

    Welcome to the Make U menu!

    Here is the current information about your person:

    Name: Joey Lingo Age: 17 Height(in Inches): 72 Height(in Centimeters): 182.88 Hobbies: Video Games and programming Languages: english and french 

    What would you like to do?

    Type "a" to add a new person

    Type "done" to leave the program.

    a

    (Second run through the method. Note how it just skips my first scanner now).

    What is your name? Only type in your first and last name: How old are you?

    The problem only occurs when the method is repeated. My code for the problematic method is below:

    public static Human questions(Scanner input, Scanner inputInt) {

     System.out.print("What is your name? Only type in your first and last name: "); String name = input.nextLine(); int numWords = wordCountTest(name); while(numWords > 2) { System.out.println("Sorry, that is not a valid name."); System.out.print("Please type two names; your first name and your last name: "); name = input.nextLine(); numWords = wordCountTest(name); } name = name.toLowerCase(); System.out.print("How old are you? "); int age = inputInt.nextInt(); System.out.print("How tall are you (in inches)? "); int height = inputInt.nextInt(); System.out.print("What color are your eyes? "); String eyeColor = input.nextLine(); System.out.print("What are your hobbies, type just one here: "); String hobbies = input.nextLine(); ArrayList<String> userHobbies = new ArrayList<String>(); userHobbies.add(hobbies); String answer1 = ""; while(!answer1.equals("done")) { System.out.println("Hobby added. Do you have other hobbies?"); System.out.print("If you do, type just one here (if you don't type \"done\"): "); answer1 = (input.nextLine()).toLowerCase(); if(!answer1.equals("done")) { userHobbies.add(answer1); } } System.out.print("What languages can you speak? Type just one: "); String languages = input.nextLine(); ArrayList<String> userLanguages = new ArrayList<String>(); userLanguages.add(languages); String answer2 = ""; while(!answer2.equals("done")) { System.out.println("Language added. Do you speak other languages?"); System.out.print("If you do, type just one here (if you don't type \"done\"): "); answer2 = (input.nextLine()).toLowerCase(); if(!answer2.equals("done")) { userLanguages.add(answer2); } } Human user = new Human(name, age, height, eyeColor, userHobbies, userLanguages); System.out.println("Great! Your person has been created!"); System.out.println(); return user; 

    }

    Hopefully this is enough information. Also open to any comments on the code style itself if it could be better somehow.

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

    Desperately in need of help! have already done most of it just have questions!

    Posted: 11 Dec 2017 05:25 PM PST

    Hi i'm on a problem right now for my test and im really stuck. This is the question: Write the program with at least two functions to solve the following problem. The members of the board of a small university are considering voting for a pay increase for their 100 faculty members. They are considering a pay increase of 5%. Write a program that will prompt for and accept the current salary for each of the faculty members, then calculate and display their individual pay increases.

    This is what i got so far:

    include <stdio.h>

    include <stdlib.h> double getIncrease (double curSal); int main (void) { double CurrentSal[3]; double payIncreases[3]; for(int i=0; i<3; i++) { printf("Enter the salary for employee %d: $", i+1); scanf("%d", &CurrentSal); } for (int j=0; j<3; j++) { payIncreases[j] = getIncrease(CurrentSal[j]); printf("The pay increase for employee %d is $%d\n",j+1, payIncreases[j]); } return 0; } double getIncrease (double curSal) { double PayIncrease; PayIncrease = curSal*.05; return PayIncrease; } 

    My problem is that when i run it, the first salary increase is correct, however the following ones are not, they keep going down. I really dont know how to fix it, the code looked fine to me.

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

    I need help with Bresenham's Algorithm

    Posted: 11 Dec 2017 12:42 PM PST

    How can I modify Bresenham's Algorithm so that I can draw a line that has a slope less than -1. For example I have the coordinates (2, 1) and (4, -3). This yields a dx of 2 and a dy of -4. The slope is -2 which is less than -1. How can I modify the following algorithm to plot this?

    plotLine(x0,y0, x1,y1)

    dx = x1-x0 dy = y1-y0 y = y0 e = 0 for x from x0 to x1 plot(x,y) e = e + dy if 2*e > dx y = y+1 e = e - dx` 
    submitted by /u/_NarutoBoi96
    [link] [comments]

    Arduino Code Help

    Posted: 11 Dec 2017 03:01 PM PST

    Hi I am working on a project for class to make a circuit with a button that cycles through 3 arrays with each press of a button. That is button is pressed Array 1 same button hit again array 2 and again array 3 before going back to 0 and starting again. I have gotten my code so that it says there is no errors in the error check but it will not light the lights please help.

    int ledPins[] = {12, 13, 8, 9, 10, 11,};

    int ledpins[] = {13, 10, 8, 9, 12, 11,};

    int Array[] = {8, 12, 9, 13, 10, 11,};

    int count = 0;

    int pushButton = 2;

    int timer = 100;

    void setup() {

    Serial.begin(9600);

    pinMode(2, INPUT);

    for (count=0;count<6 ;count++) { pinMode(ledPins[count], OUTPUT);

    } }

    void loop() {{

    int buttonState = digitalRead(pushButton);

    Serial.println(buttonState);

    {

    if (buttonState == HIGH) {

    count ++;

    delay(1000);}

    }{

    if (count == 1) for (int ledPins=1; ledPins<6; ledPins++){

    digitalWrite(ledPins, HIGH);

    delay(timer);

    digitalWrite(ledPins, LOW);

    }

    else if (count == 2)for (int ledpins=2; ledpins<6; ledpins++) {

    digitalWrite(ledpins, HIGH);

    delay(timer);

    digitalWrite(ledpins, LOW);

    }

    else if (count == 3)for (int Array=3; Array<6; Array++) {

    digitalWrite(Array, HIGH);

    delay(timer);

    digitalWrite(Array, LOW);}

    {

    if (count == 4) for (int count=4; count<6; count++)

    {

    count = 0;}

    }}}

    }

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

    [R] Turning groupings of column data, separated by NAs, into unique columns or rows

    Posted: 11 Dec 2017 02:11 PM PST

    Hey guys, I am learning R and am at the last part of my assignment and am really getting confused.

    I have a csv file which I imported as a data.frame that has dates in the left most column and tickers at the top. For each ticker on a date, the cell is filled with the daily return if the fund was involved in it and its empty (NA) if it wasn't. So basically I have a file where each ticker has periods where there are returns listed in multiple cells then its NAs for a while then returns again, etc.

    Date ABC ADC AFG ARG AAPL

    1/1/17 .12 .14 NA NA .17

    1/2/17 .13 NA .16 NA .18

    etc.

    Basically I need a way to list each instance of returns as a unique column. So if the company was involved in a ticker for 10 days straight then was not involved for 20 days then involved again for another 10 days, I would have 40 days of 10-20-10 in one column but I need it turned into two column each listing the unique 10 day returns.

    I'm sure I am overthinking this but any help would be greatly appreciated!

    submitted by /u/Fuck-mayonnaise
    [link] [comments]

    Solving large system issues

    Posted: 11 Dec 2017 05:25 AM PST

    Hi, as a software engineer working in large software companies, I often have to work on fixing non trivial systemic problems in a given software ecosystem.

    Typically it'll take me weeks to months before a solution and its patterns emerge. This is because I often don't initially know enough about the system and its usage. For most of the time during the solution incubation phase, I find myself not working directly on trying to solve the problem but instead just spending time to learn as much as I can about the systems involved and their use cases. Then eventually, somehow magically, a pretty good solution generally comes by.

    I'm wondering how other people approach those large and complex software system problems to find good solutions faster.

    Having more experience must obviously help but that's not something you build up so quickly.

    My method might seems too indirect and inneficiant but so far it felt like the right thing to do as I often feel like if a solutions isn't almost obvious, it's because I lack some knowledge, so I will work to gain it.

    What are your approaches specific or adapted to software engineering for working toward solving major system issues when you're new to a given ecosystem?

    edit: removed a comment about wondering if this sub is the right place to ask this

    submitted by /u/asking-this-question
    [link] [comments]

    [PYTHON] [PRAW] [TKINTER] How would I go about displaying the output of my bot using tkinter?

    Posted: 11 Dec 2017 05:17 AM PST

    So I've just learned about tkinter and made a simple GUI with a button that starts my bot. Basically I just did...

    def bot(): <My bots code> root =Tk() menu=Menu(root)

    Through my bots code I have a bunch of stuff like

    print("found comment matching parameters")

    ...and so on so it normally prints outputs in the console as the bot runs.

    How would I go about streaming the output of my bot like it normally does in the console into a tkinter widget of some kind?

    edit: formatting

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

    why this error, how to resolve it [PYTHON]

    Posted: 11 Dec 2017 08:34 AM PST

    name = input("What is your name? ") quest = input("What is your quest? ") color = input("What is your favorite color? ") name = str(name) quest = str(quest) color = str(color) print ("Ah, so your name is %s, your quest is %s, " + "and your favorite color is %s." %(name, quest, color)) 
    submitted by /u/prashantkr314
    [link] [comments]

    What steps needed to convert a legacy Delphi program to a modern cloud-based one?

    Posted: 11 Dec 2017 05:43 AM PST

    I work in book publishing and my company acquired a smaller company that has a software program in its catalog. This program was written in Delphi (~1999) and is designed to give romance novel writers story ideas, plot devices, etc. The program is interesting but barely works on modern Windows or Macs. And the interface is super old. We've thought about turning it into a modern cloud-based SAAS but have no idea best steps. The code may be completely unusable and I know it's not a simple conversion. We just have no idea what would be the scale and cost of this project. Are there companies out there that do this type of job estimation before we actually have to commit to the project?

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

    Modern solution to storing/reading table data

    Posted: 11 Dec 2017 12:25 AM PST

    I have an usecase where I'm working with table data (pandas dataframes). There are two cliens:

    • one is writing data every minute
    • one is reading all stored data, a few times per day

    In the past I'd create a postgresql database and write/read from this database from my python app. But it feels like this is an old-fashioned solution. What do the cool kids nowadays use?

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

    How are files moved on a drive internally?

    Posted: 11 Dec 2017 04:05 AM PST

    Basically what I am asking if a file is moved from /downloads to /desktop, what is happening? This is ignoring variables like partitions or drives.

    Is the file physically moving or does it like have a number tied to it that changes?

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

    No comments:

    Post a Comment