• Breaking News

    Tuesday, October 9, 2018

    Every beginner needs to understand that no one is ever not a beginner learn programming

    Every beginner needs to understand that no one is ever not a beginner learn programming


    Every beginner needs to understand that no one is ever not a beginner

    Posted: 08 Oct 2018 09:43 AM PDT

    I've been teaching people how to program on my local FRC team, a high school robotics team. I'm teaching high school freshman and sophomores, although I'm only a senior myself lol. So while I do not have a ton of experience and technology knowledge, I do try to offer a lot of more general advice and help from the perspective of someone who was just in there shoes. I really try to lower the intimidation factor and the self guilt of feeling like you don't know enough. I remember when I started programming I always felt bad for having to look up everything I did and not understand the inner workings of a library. I felt like I wouldn't be a programmer until I knew everything about programming. Although looking back, the best thing I have learned is that no one is ever a good programmer, everyone is always a beginner on some level. There is simply to much programming to learn it all. Programmers simply learn how to learn.

    I have link to the video that made me want to post this. I think this video is definitely worth the 5 minutes to watch and will hopefully help inspire new programmers.

    https://youtu.be/YmWMi1kVCG8

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

    What kind of projects did you build when you were first learning programming?

    Posted: 08 Oct 2018 09:52 PM PDT

    I'm curious to see what you have to share since I am new to Python and plan on building something small and simple today.

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

    Matlab to Java or Python, Image manipulation.

    Posted: 08 Oct 2018 10:40 PM PDT

    Good evening all, So today I had a matlab assignment that asked me to take This image and select our favorite 5 sprites and output them to something like this.

    In Matlab I did it with something like,

    clc,clear; pic = imread('sprites.png'); Link(:,:,1) = pic(1:92,1:85,1); Link(:,:,2) = pic(1:92,1:85,2); Link(:,:,3) = pic(1:92,1:85,3); a = Link; Mario(:,:,1) = pic(181:272,255:339,1); Mario(:,:,2) = pic(181:272,255:339,2); Mario(:,:,3) = pic(181:272,255:339,3); b = Mario; bMage(:,:,1) = pic(92:183,255:339,1); bMage(:,:,2) = pic(92:183,255:339,2); bMage(:,:,3) = pic(92:183,255:339,3); c = bMage; shinobe(:,:,1) = pic(92:183,1:85,1); shinobe(:,:,2) = pic(92:183,1:85,2); shinobe(:,:,3) = pic(92:183,1:85,3); d = shinobe; samus(:,:,1) = pic(276:367,85:169,1); samus(:,:,2) = pic(276:367,85:169,2); samus(:,:,3) = pic(276:367,85:169,3); e = samus; imshow(Link); imshow(Mario); imshow(bMage); imshow(shinobe); imshow(samus); faves = cat(2,a,b,c,d,e); imwrite(faves,'faves.png'); 

    What would be the best way to begin transferring this into Java/Python?

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

    The Basics by Tom Scott - New Season is Starting

    Posted: 08 Oct 2018 09:57 AM PDT

    I love Tom Scott and believe that his "The Basics" series is a great way to explain to a new programmer how to think through a problem. The first episode of season 2 talks through finding the longest word that can be written on a 7-segment display. His high production value makes this very easy to watch and follow along.

    If anyone wants to try his challenge at home I'd love to see your solutions in the comments. We can all help each other out if needed. :)

    https://youtube.com/watch?v=zp4BMR88260

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

    Are hackathons recommended for non students?

    Posted: 08 Oct 2018 05:37 PM PDT

    Im very new to programming, still at the "intro to python" level. I went to a hackathon recently that was marketed as "no experience needed!!!". I came expecting it to not quite be the case, figured id present or help brainstorm.

    I was immediately out of my element. Everyone there was SUPER young which isn't an issue, but it all seemed very clique-y. As if every group came together and was super tight knit.

    Normally that doesn't bother me either if I feel like I have something to offer, but being so new at programming I didn't feel like I could be useful.

    Anyway, id like to go back next year when I know more of what I'm doing, but id like to make sure its even worth it first. Im a CS major, but im 35 so I feel like ill always be way older than the students at these hackathons. If hackathons are good for experience or look good on a resume, then I'll go. If not I may just skip it

    Any advice?

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

    My C++ Course is killing me and a few classmates.

    Posted: 08 Oct 2018 08:13 PM PDT

    Our textbook simply doesn't cover a group of assignments that we received recently. We search everywhere for the answers and collectively can't find the answer. It seems that 5-10 students have programmed extensively before and they helped me and a few others and we all looked at their code and said "How did you even think of this?" It's pretty disheartening but will it get easier the more I see these problems?

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

    I'm trying to make a calculator that turns dog years into human years, I need to do it somewhat in this format for my high school class, but keep getting a "error:cannot find symbol" on line 39.

    Posted: 08 Oct 2018 10:16 PM PDT

    //I'm new to programming and anything helps

    import java.awt.*;

    import java.awt.event.*;

    import javax.swing.*;

    import java.text.DecimalFormat;

    public class DogYears extends JFrame

    implements ActionListener

    {

    JTextField inputDogAge, displayHumanAge;

    public DogYears()

    {

    super("BMI Calculator");

    JLabel labelDogAge = new JLabel("Dog's Age:", SwingConstants.RIGHT);

    inputDogAge = new JTextField(5);

    JLabel labelHumanAge = new JLabel("Human Age ", SwingConstants.RIGHT);

    displayHumanAge = new JTextField(5);

    displayHumanAge.setEditable(false);

    JButton go = new JButton("Compute");

    go.addActionListener(this);

    Container c = getContentPane();

    c.setBackground(Color.white);

    JPanel p = new JPanel();

    p.setLayout(new GridLayout(3, 2, 5, 5));

    p.add(labelDogAge);

    p.add(inputDogAge);

    p.add(labelHumanAge);

    p.add(displayHumanAge);

    c.add(p, BorderLayout.CENTER);

    c.add(go, BorderLayout.SOUTH);

    }

    public void actionPerformed(ActionEvent e)

    {

    int DogAge = Integer.parseInt(inputDogAge.getText());

    int HumanAge = calculateHumanAge(DogAge);

    //This is Line 39, error:cannot find symbol ^

    DecimalFormat df = new DecimalFormat("00.0");

    displayHumanAge.setText(df.format(HumanAge));

    }

    private int calculateHuman(int DogAge)

    {

    int HumanAge = (DogAge-1)\*4+15; 

    }

    public static void main(String[] args)

    {

    DogYears w = new DogYears();

    w.setBounds(300, 300, 300, 160);

    w.setDefaultCloseOperation(EXIT_ON_CLOSE);

    w.setVisible(true);

    }

    }

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

    Keeping track of your progress

    Posted: 08 Oct 2018 10:11 PM PDT

    Hi all,

    I'm currently on my first real professional development project and I find that I'm having trouble keeping track of my progress/tasks. Im working in an Agile SCRUM environment so I can pick my stories in JIRA and see what I have in progress. The issue is keeping track of each item in the acceptance criteria. The problem is even more evident when I'm working on two interrelated stories that need to be developed in tandem. What are some tools/techniques I can use to keep track of individual checklist items in a story?

    I'm working on the Appian BPM platform if it matters.

    Thanks!

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

    Min and Max functions not working for an array

    Posted: 08 Oct 2018 09:29 PM PDT

    Hey all, im working on a code in C that should take values and return the Average, max and Min of the inputted numbers. The average function works fine, but the maximum and minimum only return the first value in the array. so, if I input 11 12 5 17, it would calculate the average correctly, but the max and min would only return "11". I think its not iterating through the values i provide. Heres the code.

    #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <pthread.h> int max; int min; float avg; int len; int size; void *average(void *val) { int *array = (int*) val; int i = 0; int sum =0; for (i = 1; i < size; i++){ sum += array[i]; } avg =(float)sum / ((float)size -1); pthread_exit(0); return NULL; } void *minimum(void *val) { int *array = (int*) val; int i = 0; min = array[1]; for(i =1; i<size; i++) { if(min > array[i]){ min = array[i]; } pthread_exit(0); } return NULL; } void *maximum(void *val) { int *array = (int*) val; int i = 0; max = array[1]; for(i =1; i<size; i++) { if(max < array[i]){ max = array[i]; } pthread_exit(0); } return NULL; } int main(int argc, char *argv[]) { int *array;// use this to store the command line parameters as integers size = argc; array = (int*)calloc(size,sizeof(int)); int i = 0; for (i=1;i<size;i++){ array[i]=atoi(argv[i]); } pthread_t thread0; pthread_t thread1; pthread_t thread2; pthread_create(&thread0,NULL , average, array); pthread_create(&thread1,NULL , maximum, array); pthread_create(&thread2,NULL , minimum, array); pthread_join(thread0, NULL); pthread_join(thread1, NULL); pthread_join(thread2, NULL); if (argc < 3) { printf("You have to supply at least 2 integers as arguments!\n"); return 0; } printf("Average: %f\n" , avg); printf("Maximum: %i\n" , max); printf("Minimum: %i\n" , min); return 0; } 

    So after i compile it and invoke it with ./pthreadfunc 11 12 13, it spits out the results but doesnt give the min and maxs correctly. any ideas?

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

    Mother of 2 boys under 2 - getting into coding

    Posted: 08 Oct 2018 01:49 PM PDT

    I'll try to keep it brief.

    I graduated with a LLB (1st class) in 2016 my first son Zach was 3 months. I began a research masters MSc that September (1st class). I then took a break as we moved abroad for my husband's career. I had our second son last month :)

    I got a scholarship to do a law PhD at a prestigious university but felt that law lacked flexibility. My husband is a software engineer and it's weird we've been married for 5 years and I never really knew what he did.

    I expressed an interest in coding and wow it surprised me. I found it so interesting, easy to understand (although it's early days), and enjoy generally following tech news and podcasts. I realised I put so much effort and hours (40hr weeks while pregnant) to do as well as I did at law. Often I was just pushing through or forcing myself to enjoy it and work hard.

    My husband is moving us to Ireland he's about to start a job with a big 4 and is so supportive of me getting into software. He's teaching me, he's incredibly smart and talented!

    Another random plus is, we'd argue about him coding all the time, I felt he was super introverted and I was jealous of the "black screen" as I used to call it. Now I have my own black screen and he loves it, like saying oh now you understand ha.

    I just want others experience and advice, is this possible with 2 small children, how much time do I need to put in realistically to make this career change.

    Also MSc CS conversion (husband thinks this is best) or coding boot camp?

    I'm currently going through FCC, and watching CS50 lectures along with some YouTube stuff. I've covered HTML and CSS and working on learning JavaScript. Can anyone recommend me anything different or give suggestions.

    Just looking for advice really as I'm an anxious person :)

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

    I'm having some very specific problems with my brackets (x-post with learncsharp)

    Posted: 09 Oct 2018 12:54 AM PDT

    I've been learning C# for a week or two, and have had a problem twice where I try to put in a set of curly brackets and it only gives me one, and if I manually put in two they don't work. It also breaks the namespace brackets as well. This is my first language, and I'm at a loss. Google hasn't been helpful either.

    This gif shows my problem.

    https://imgur.com/f8qlcSu

    This is the code I'm trying to copy.

    https://imgur.com/f64CTpA

    Thanks for the help!

    submitted by /u/Darmok-on-the-Ocean
    [link] [comments]

    How to prepare for a Python Data Science Bootcamp

    Posted: 09 Oct 2018 12:41 AM PDT

    I would like to attend a data science bootcamp but I've been out of school for 10 years which means that I've forgotten Calculus, Linear Algebra, Regression/ANOVA, etc. I don't have programming experience. I've only taken HTML/CSS and JavaScript on Codecademy. I'm currently taking a very light course on DataCamp called intro-to-python-for-data-science.

    I live near NYC and I'm interested in going to either Metis, NY Data Science Academy or Flatiron but I'm worried that I don't have the skills for the bootcamp. I need a job quite urgently and I want to apply for the January cohort but I'm worried that I don't have the skills needed to do well in the bootcamps.

    Is the rest of Oct and Nov enough time to get up to speed with going to these bootcamps? Is that really enough time to learn Python and re-learn the prior math that I've forgotten and learn Probability Theory? What path have you taken to learn Python to be job-ready - self study via an online course or a bootcamp?

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

    Where to Start to Learn This Design

    Posted: 09 Oct 2018 12:09 AM PDT

    Hi there,

    I want to create a splash page for my website similar to this:https://codepen.io/EsambinoHsieh/pen/Ahlxi

    I'm unclear on where I should get started and what I should begin learning. Thanks!

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

    Python: What does it mean for a variable to be destroyed?

    Posted: 09 Oct 2018 12:04 AM PDT

    They say exiting a local scope will destroy local variables. What do they mean by entering and leaving a scope, why are global variables still "alive" even though I "exit" it and "entered" local scope.

    What does it mean in Python for a variable to exist/live and to die/not exist?

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

    Should I recreate MVC's Controllers and Views in Web Api?

    Posted: 08 Oct 2018 11:50 PM PDT

    I tried using MVC when this problem occured to me. I was trying to create an API that changes the two factor authentication of user that can be called using a checkbox.onchange instead of a submit button. Will this work?

    Then I tried using WebApi but there are so many controllers that I need to recreate and thought of going back to MVC.

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

    How do I get better with installing libraries and building code from source?

    Posted: 08 Oct 2018 07:36 PM PDT

    Good evening everyone!

    I have been working on some projects recently, specifically computer vision on ARM based processors (raspberry pi, nvidia jetson, etc.) and since these devices often don't have pre-built binaries to install for their libraries, I end up trying to build from source a lot, but it never seems to go very well. I often get errors from missing dependencies (which weren't covered in the build instructions) or it will make just fine, but then when I try to import the library it will fail, and often times I just try again and again and again until it eventually ends up working once, and then it stops again.

    Is there anywhere I can go to learn more (or a book I can read) about how to work with libraries that I am building from source? Since it seems that I am always missing environment variables and dependencies and such? Or does it just vary so heavily from application to application that I should just git good through practice?

    Thanks in advance

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

    Can't figure out how to make Bootstrap 4 media queries go from desktop first to mobile, instead of the default way (mobile to desktop)

    Posted: 08 Oct 2018 11:13 PM PDT

    So, I am trying to incorporate Bootstrap 4 "container" class media queries in my code, because I like how they scale the width of the screen size and how they wrap the content.

    The media queries for the container class go from mobile to desktop and I am trying to switch them to go from desktop to mobile, just because it's easier for me (I know you should really design for mobile first, at least that's what I'm told, but I'm just doing this for myself) - also, at this point, I just want to figure out how to do this because I've been trying for a few days and just can't seem to get it for some reason, it's really bothering me.

    I can't seem to get the correct min or max to make it responsive, nor the correct order for the declarations.

    Here is the Bootstrap 4 container class media query - how would I make it a desktop-first media query instead of mobile first (like it is now)? With these same values, I just want it to be desktop first, and then work its way into mobile. How would I write this?

     @media (min-width: 576px) { .container { max-width: 540px; } } @media (min-width: 768px) { .container { max-width: 720px; } } @media (min-width: 992px) { .container { max-width: 960px; } } @media (min-width: 1200px) { .container { max-width: 1140px; } } 

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

    Python : Lat/long conversion calculator - Need User Input

    Posted: 08 Oct 2018 10:53 PM PDT

    I need to take a user entered value that will be a coordinate entered either in Degrees/Minutes/Seconds, or Decimal degrees and convert it to the other. I think I have everything define pretty well but I am having huge issues with accepting and splitting the user's input so that it can be used. This is what I have so far:

    print("A tool to convert Latitude or Longitude coordinate between Degrees, Minutes, and Seconds (DMS) and Decimal Degrees (DD)")

    print ("Please follow the instructions and enter the Latitude or Longitude coordinates to correctly perform a conversion calculation" "\n")

    def dms2dd(degrees, minutes, seconds):

    dms2dd_format = "%f,%f,%f"

    dd = (float (degrees)) + (float (minutes) /60) + (float (seconds) / (60 / 60))

    def dd2dms(deg):

    dd2dms_format = "%10.3f"

    d = float (deg)

    md = abs (deg - d) * 60

    m = abs (md)

    sd = (md - m) * 60

    s = abs (sd)

    loop_count = 0

    while loop_count < 4:

    loop_count += 1

    try:

    loc = float(input("What are the coordinates of your location in either Degrees, Seconds, Minutes or in Decimal Degrees? : " "\n"))

    loc.split()[1:4][4:6]

    except:

    continue

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

    how to create a matrix with python?

    Posted: 08 Oct 2018 07:07 PM PDT

    X = np.empty((100, 871), dtype=np.float32)

    and I have a for-loop to assign each x for one time.

    each x is a vector, how to create a matrix with np.matrix() from these x?

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

    Question about Microsoft’s programs

    Posted: 08 Oct 2018 10:52 PM PDT

    If the entire office 365 suite is written in c++, what GUI library do they use?

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

    How is the C Standard Library implemented?

    Posted: 08 Oct 2018 10:49 PM PDT

    For something like printf() that relies on I/O, how are these implemented? C works across multiple operating systems so the details of I/O is different for each OS.

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

    How far does a portfolio of hobby projects bring you in terms of landing a job?

    Posted: 08 Oct 2018 03:11 PM PDT

    Would like to know your experience! I'm building a portfolio but 80% of the stuff there consist of hobby projects (rest is work related).

    PS: I find it's not easy to put my entire work project (a productivity tool) on my portfolio as it is quite meaningless without context and lengthy description...

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

    CS professor accused me and three students of copying code from each other. I didn’t do it and don’t know these people. How do I prevent this from happening?

    Posted: 08 Oct 2018 10:25 AM PDT

    Sorry for the crappy title. Here is the situation.

    I'm in a beginners C++ class at my university. We were given an assignment to make a simple guessing game. The class is a little large and I think the professor teaches another section of the class. I worked on my assignment by myself, never went to the lab, and I don't really talk to the students in the class. In fact I don't even know any of their names.

    I got my assignment back today and three other students and I were accused of cheating. It looks like the parts that were called into question were two similarly named variables and a for loop that was similar between the assignments.

    I was very upset when I got my assignment back and went up to the professor after class almost in tears to talk about what was happening. To his credit he listened to what I was saying and I think he decided to give us a pass this time around.

    Here is my question though, I literally don't know how to prevent this from happening in the future. I didn't use any online tutorials and like I said didn't use resources at the university or collaborate with other students. The closest thing I did to "copying code" was referencing the professor's notes when I got confused about how a for loop works.

    I'm also afraid that should I need help figuring out a problem, using the university's resources will also be considered cheating. This feels like a lose/lose situation. Any help would be appreciated.

    Edit: Hey everyone! I just wanted to thank you all for your advice and nice words. I had work right after I posted this, but it has been really nice to see that I'm not entirely crazy. I'm sure my professor will day something about this during our Wednesday class, so hopefully he'll have some solutions too.

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

    How to create a .aspx.cs Controller for .aspx Views? (ASP. Net)

    Posted: 08 Oct 2018 10:15 PM PDT

    Hi, I am very new to using .aspx file types and have only been able to find a way for creating .aspx views

    I had been using .cs Controllers for .cshtml Views in my project only to be told that these weren't what I should be using as they didn't match others. I have a lot of still usable code (we assume) that can be copied over with a couple of changes.

    I used new item -> web -> webform to create my views, but I cannot seem to figure out how to create a new controller for them

    Thanks for reading!

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

    No comments:

    Post a Comment