• Breaking News

    Tuesday, August 6, 2019

    My 7 year old wants to learn how to program. Where do I start? learn programming

    My 7 year old wants to learn how to program. Where do I start? learn programming


    My 7 year old wants to learn how to program. Where do I start?

    Posted: 05 Aug 2019 05:13 AM PDT

    My 7 year old has a lot of interest in video games since I first had her playing Minecraft a few years ago. She still is really into gaming, but over the past month or so, she has really shifted her focus into how the games are developed. She's really into youtube videos for programming and has started to learn on her own with a little guidance from me. I was wondering if there are any great resources for kids that you have used to teach kids.

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

    Shoutout to The Odin Project (SysAdmin to Full Stack Dev)

    Posted: 05 Aug 2019 09:40 PM PDT

    I just wanted to give a huge THANK YOU to the folks over at The Odin Project for their excellent program! I have worked in a SysAdmin role for several years now, but have really been wanting/trying to make the switch to development. I tried a ton of different learning resources including, Automate the Boring Stuff (which was an excellent start), Codecademy, Treehouse, and FreeCodeCamp. BUT, The Odin Project is hands down, THE BEST free curriculum available to people who want to learn how to program, imo. It forces you to apply the knowledge as you go and it doesn't hand-hold like other resources do. It is amazing and very well thought out. I'm still in the middle of the program, but I really wish I had only heard about it sooner.

    If you have been struggling to stick with something or just really want a good challenge (up-and-comers), go do The Odin Project!

    submitted by /u/_the-dark-knight_
    [link] [comments]

    How to be a good junior developer?

    Posted: 05 Aug 2019 05:43 PM PDT

    Hi, I'm a self taught developer. And I had got a internal ship for six months. And my question is how can I be a good junior developer?

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

    PHP vs Python for WEB

    Posted: 05 Aug 2019 11:43 PM PDT

    Hello.

    Recently, the discussion has become the most popular: PHP vs Python for WEB

    Python is simple, convenient. At the same time, it allows the development of applications in other areas.

    But PHP isn't losing ground. PHP 7.3 is ahead of Django in performance!

    I want to ask your opinion. What today is promising to study for WEB Backend?

    What are the advantages and disadvantages of PHP and Python in your opinion?

    If to speak about me, then the C-like syntax is closer to me. Python is simple enough to be complicated.

    However, Python is attracted by the ability to write applications with no bulk code.

    Answers from those with experience in both PHP and Python are desirable.

    Thank you

    P.S.

    As a filter-screener of juniors, please briefly tell me in the answer who you are, what you do in IT.

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

    (Windows UWP) How'd I go about programmatically detecting when the webcam is on or recording?

    Posted: 05 Aug 2019 11:27 PM PDT

    Hi. I need your help to see if I'm on the right track. I'm a noob, so forgive me for saying silly noob things.

    I decided to start a, hopefully, simple UWP project to notify the user if their webcam is on or recording. I delved into Microsoft documentation to see which classes I should use. And I'm more confused now than before. I didn't see anything specifically useful in Windows.Devices.Enumeration (mostly returning information about devices). Windows.Media.Devices namespace has classes to control audio and video devices but not to see if any other process is. Could Windows.System namespace have anything useful for me?

    How else could I go about programmatically detecting webcam activation? Somehow checking if some process loads a webcam DLL?

    Is programming, more than 50% of the time, reading ridiculously long API documentations, and feeling stupid the other 50% of the time?

    Thanks.

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

    The purpose of return 0;

    Posted: 05 Aug 2019 10:49 PM PDT

    Let me see if I understand the concept of return 0; in the main function. If the program has no errors, the value returned is 0. But if there is an error, the value returned is some random number assigned to the specific error. Like if there was an error, the value returned might be something arbitrary like 125. Am I understanding this correctly?

    submitted by /u/2kfan
    [link] [comments]

    Can someone please explain to me the difference between a library, framework, package and an API?

    Posted: 05 Aug 2019 02:49 AM PDT

    I'm not understanding the difference between all these things.

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

    Is thirty minutes a day after work enough to learn programming?

    Posted: 05 Aug 2019 04:20 PM PDT

    Hi all,

    I'm in a job I don't particularly enjoy and I was hoping to learn programming after work to eventually get a programming job, however I don't have a lot of extra time.

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

    Learning OOP

    Posted: 05 Aug 2019 08:22 PM PDT

    How did you guys learn about OOP? By reading books, writing codes?. I find it very hard to understand OOP concepts such as abstraction, polymorphism, and the reason why class is useful. Therefore, please share your tips to learn this paradigm

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

    How to contribute to open source - guide from GitHub

    Posted: 05 Aug 2019 02:19 AM PDT

    Haven't seen this posted here before as a resource and I think it's probably the best guide I've seen for learning how to contribute to open source.

    https://opensource.guide/how-to-contribute/

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

    How much should I prioritize learning multi-thread coding?

    Posted: 06 Aug 2019 12:53 AM PDT

    I can see a lot of the benefits of parallel programming and it can make programs a lot faster but when people are discussing getting hiring or working on projects this isn't brought up often? Is it more specialized or something?

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

    Mobile App Development Beginner

    Posted: 06 Aug 2019 12:44 AM PDT

    Hi, I have been given a task to create like a booking app for a project but i have no idea where to start. It needs to be for IOS and Android. I am decent at java and c# in my opinion but i know nothing about design or what programs i need to use for the app. I have done quite a bit of sql and web dev as well in the past. What I am asking is how should I work flow this project? what software should I use considering I need to make it look good and it might need to connect to a database. I have some time to complete this and I don't mind learning anything new but a few pointers would be really helpful. Thanks!

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

    Would it be unreasonable to expect someone to produce simple (but production quality) layouts in HTML & CSS after 2-weeks of learning?

    Posted: 05 Aug 2019 08:29 PM PDT

    I asked this question over in r/webdev and I was sort of shocked by the answers. A lot of people over there seem to believe HTML requires a doctorate before you even think about creating production level markup.

    Here's the background. I run a small web development agency - we specialize in e-commerce themes for platforms like Shopify and WooCommerce. I have a team of designers and content creators, but I am the sole developer. I am overwhelmed with work. I have a brother who needs some work, and I told him if he can pick up basic HTML & CSS I'd send some work over on an "as needed" basis.

    He's been at it for 2 weeks now. He's learned basic HTML, CSS, SCSS, Flexbox, media queries, mixins, variables, etc... Of course, he's extremely new to this, the code isn't perfect, but he's learning quick with feedback from me.

    I want him to work on a small site. Only the secondary pages with dead simple layouts (about, faq, contact, etc). It's real simple, primarily text based. I only want him to do the HTML & SCSS. That's it. From there I will review, test, and chop up & drop into the theme where needed, with the necessary logic applied.

    His code won't be perfect, but that's what I'm here for. I only wanted to know if this would be a reasonable task. r/webdev was a 100% no, but I thought I'd ask here.

    Due to the responses, I decided to whip up a quick 'test project' for him. That way he can also practice git & get familiar with some pm tools. And I can see where he's at. The test mockup I sent him is actually much more difficult than the tasks he'll be doing.

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

    Vertically center align issue

    Posted: 05 Aug 2019 11:41 PM PDT

    I am trying to vertically center align my content inside signInBody div, but am having no effect. What should I try or am I doing wrong? I have been reading online how vertical align does not always work as intended, but do not quite get why so yet. Below is the code setup. I have tried to align my content inside the signinBody with vertical_center id but have been unsuccessful:

    html code:

    <div id="signInBody">

    <div id="vertical\_center">

    <div id="middle\_place">

    <img src="blank bc link is really long" id="login\_pic" />

    <div>

    <label for="uname"><b>Username</b></label>

    <input id="username\_input" type="text" placeholder="Enter Username" name="uname" required />

    </div>

    <div>

    <label for="psw"><b>Password</b></label>

    <input id="password\_input" type="password" placeholder="Enter Password" name="psw" required>

    </div>

    <button style="width: 18.5%" id="sign\_in\_submit\_button" type="button">Sign In</button>

    <div>

    <a onclick="location.href='@Url.Action("CreateAccount", "Home")'"> Create an Account</a>

    </div>

    </div>

    </div>

    <div>

    CSS:

    #signInBody {

    border: thick solid black;

    margin-right: 35%;

    margin-left: 35%;

    margin-top: 5%;

    margin-bottom: 5%;

    padding-bottom: 24%;

    padding-top: 5%;

    background-color: lightyellow;

    }

    #middle_place{

    text-align: center;

    }

    #sign_in_submit_button {

    background-color: white;

    color: green;

    border: 2px solid green;

    text-align: center;

    }

    #sign_in_submit_button:hover {

    background-color: green;

    color: white;

    text-align: center;

    }

    #vertical_center{

    vertical-align: middle;

    }

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

    Imposter-Syndrome and First Large Novice Project

    Posted: 05 Aug 2019 05:17 PM PDT

    I've first learned how to program in middle school doing online crash courses and tinkered around with it every once in a while. Fast forward to uni and I have a solid understanding of basic coding logic and have breezed by my coding courses thus far in my engineering degree. Even though I started so long ago and have done well in my classes, I still feel like I'm not 'legit' and don't know enough to land a software dev internship so I'm trying to build my portfolio. So far I've done a tic-tac-toe game in C++, a basic website, and a pizza order system in Java, on top of countless tiny class exercises.

    For my next project, I want to do something larger scale but not sure if it is too much given my experience and that I want it done (MVP) in one month. I want to do a desktop-based journal application that could track things like mood and activities then have an insights/stat page. Obviously, I would need to start small then build-up to all the features I want but even still it seems overwhelming.

    1. Does this project sound realistic to accomplish in one month?
    2. What language would you recommend to use for this? I want either a web-app or a desktop app.
    3. Any tips on how to get started?

    For some more personal info, I have worked in C, C++, Java, Javascript, HTML, CSS and Python, but I'm not well versed in any of them and get by googling around. I've done uni courses in OOP, data structures and programming basics. Right now I'm feeling like I have lots of credentials but I feel like it's all smoke and mirrors. Things like getting my IDE setup and using GitHub still take me countless google searches and makes me feel like an outsider to the whole space. Not sure if I have imposter-syndrome or actually an imposter, behind in what's expected of someone entering the workforce soon. Also, my degree is applied math and engineering with a focus in computers/comms, so while I'm taking a few comp eng courses the focus is more math-heavy and I'm not 100% that programming is what I want to do as a career.

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

    Would this program suffice for interview on Parking Lot OOP in C++?

    Posted: 05 Aug 2019 10:58 PM PDT

    I have an interview coming up for a C++ developer role. I'm trying to get more practice with writing OOP so I decided to code a Parking Lot program. The code is below:

    I have the following code:

    ParkingLot.h:

    #pragma once #include <vector> #include "RegularParkingSpace.h" #include "HandicappedParkingSpace.h" #include "Car.h" class ParkingLot{ public: ParkingLot(); int numRegularParkingSpaces(); int numHandicappedParkingSpaces(); void addParkingSpace(int numRegular); RegularParkingSpace getRegularParkingSpace(int i); HandicappedParkingSpace getHandicappedParkingSpace(int i); void parkCar(Car* car, int i); int isVacant(std::string parkingType, int i); private: std::vector<RegularParkingSpace> regularParkingSpaces; std::vector<HandicappedParkingSpace> handicappedParkingSpaces; }; 

    ParkingLot.cpp:

    #include "ParkingLot.h" #include <vector> #include <iostream> #include <string> ParkingLot::ParkingLot() { } int ParkingLot::numRegularParkingSpaces() { return regularParkingSpaces.size(); } int ParkingLot::numHandicappedParkingSpaces() { return handicappedParkingSpaces.size(); } void ParkingLot::addParkingSpace(int numRegular, int numHandicapped) { for (int i=0; i<numRegular; i++) { RegularParkingSpace ps=RegularParkingSpace(i); this->regularParkingSpaces.push_back(ps); } for (int i=0; i<numHandicapped; i++) { HandicappedParkingSpace hps=HandicappedParkingSpace(i); this->handicappedParkingSpaces.push_back(hps); } } RegularParkingSpace ParkingLot::getRegularParkingSpace(int i) { return this->regularParkingSpaces[i]; } HandicappedParkingSpace ParkingLot::getHandicappedParkingSpace(int i) { return this->handicappedParkingSpaces[i]; } void ParkingLot::parkCar(Car* car, int i) { if (car->getCarType()=="handicapped") { if ( this->numHandicappedParkingSpaces() >0 ) { HandicappedParkingSpace hPS = this->getHandicappedParkingSpace(i); hPS.setCar(car); } } else { if ( this->numRegularParkingSpaces() >0 ) { RegularParkingSpace regPS = this->getRegularParkingSpace(i); std::cout<<"before parking car at regular space #"<<i<<", vacancy: "<<1-regPS.getCar()<<std::endl; regPS.setCar(car); std::cout<<"after parking car at regular space #"<<i<<", vacancy: "<<1-regPS.getCar()<<std::endl; } } }; int ParkingLot::isVacant(std::string parkingType, int i) { if (parkingType=="handicapped") { HandicappedParkingSpace hPS = this->getHandicappedParkingSpace(i); return 1-hPS.getCar(); } else { RegularParkingSpace regPS = this->getRegularParkingSpace(i); std::cout<<"vacancy at regular space #"<<i<<" is: "<<1-regPS.getCar()<<std::endl; return 1-regPS.getCar(); } } 

    RegularParkingSpace.h:

    #pragma once #include <vector> #include "ParkingSpace.h" #include "Car.h" class RegularParkingSpace: public ParkingSpace{ public: RegularParkingSpace(int i) : parki(i) {} int getID() { return this->parki; } void setCar(Car* _car) { this->car=_car; } int getCar() { if (this->car!=nullptr) { return 1; } else { return 0; } } private: int parki; Car* car=nullptr; }; 

    HandicappedParkingSpace.h:

    #pragma once #include <vector> #include "ParkingSpace.h" #include "Car.h" class HandicappedParkingSpace: public ParkingSpace{ public: HandicappedParkingSpace(int i) : parkj(i) {} int getID() { return this->parki; } void setCar(Car* _car) { this->car=_car; } int getCar() { if (this->car!=nullptr) { return 1; } else { return 0; } } private: int parki; Car* car=nullptr; }; 

    ParkingSpace.h:

    #pragma once #include <vector> class ParkingSpace{ public: ParkingSpace(); }; 

    Car.h:

    #pragma once #include <vector> #include <string> class Car{ public: Car(std::string carTypei) : carType(carTypei) {}; std::string getCarType() { return this->carType; } void parkCar(); void freeCar(); private: std::string carType; }; 

    main.cpp:

    #include "ParkingSpace.h" #include "ParkingLot.h" #include "Car.h" #include <vector> #include <iostream> int main() { std::cout<<"main"<<std::endl; ParkingLot parkingLot; parkingLot.addParkingSpace(33,67); std::cout<<"num regularSpaces: "<<parkingLot.numRegularParkingSpaces()<<std::endl; std::cout<<"num handicappedSpaces: "<<parkingLot.numHandicappedParkingSpaces()<<std::endl; std::cout<<"random handicappedParkingSpace: "<<parkingLot.getHandicappedParkingSpace(53).getID()<<std::endl; Car* honda = new Car("regular"); parkingLot.parkCar(honda, 5); std::cout<<parkingLot.isVacant("regular", 5)<<std::endl; std::cout<<parkingLot.isVacant("handicapped", 53)<<std::endl; } 

    I noticed there's an error as when I run the code, I get the output:

    before parking car at regular space #5, vacancy: 1 after parking car at regular space #5, vacancy: 0 vacancy at regular space #5 is: 1 

    when the last line should be vacancy at regular space #5 is: 0

    Other than that error, would this be good enough if the interview focused solely on this problem? If not, what am I doing wrong?

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

    How to Wrap Function Based on Command Line Arguments -- Python

    Posted: 05 Aug 2019 10:28 PM PDT

    Hi peeps! I have written a bundle of scripts like this:

    my_function.py

    def foo(arg1, arg2): return arg1+arg2 

    my_wrapper.py

    def divide_by_arg(arg3): def my_decorator(func): @functools.wraps def wrapper(*args, *kwargs): result = func(*args, *kwargs) return result / arg3 return wrapper return my_decorator 

    What I would like to do is dictate when to wrap the function foo() via a command line argument in my main script. I am running into scope/assignment problems. I have something like this:

    my_main_script.py

    import my_function.foo import my_wrapper.divide_by_arg def big_function(args): # do stuff in here result = foo(arg1, arg2) # do more stuff return result def main(args): if args.wrapper_value is not None: foo = divide_by_arg(args.wrapper_value)(foo) big_function(other_args) return if __name__=="__main__": parser = argparse.ArgumentParser() parser.add_argument( "-wv", "--wrapper-value", default=None, help="divide the result of foo() by a number" ) # other args main(args) 

    I am encountering "foo referenced before assignment" errors here. I'd like to avoid passing this variable down through the function arguments (there are several layers between main() and foo(). This seems like exactly the motivation behind wrappers/decorators, but I can't figure out how to implement correctly. How can I specify the use of my wrapper function from the command line?

    Thank you!

    submitted by /u/--bromandude--
    [link] [comments]

    How to point ec2 instance to a domain name?

    Posted: 05 Aug 2019 10:14 PM PDT

    I am trying to follow this guide

    But I am confused on the last step,

    Change your DNS file to point to the IPv4 address (This would be in something like GoDaddy). 

    Where is this dns file? and what does it mean to point to the ipv4 address? is it my ec2 ipv4 address?

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

    I have no coding experience, but I need a couple lines of 'believable' script for a writing project.

    Posted: 05 Aug 2019 10:12 PM PDT

    This doesn't even need to be a real workable script; it's just going to be used as fluff for a fictional writing project.

    The story requires the function to be: Check if X has happened in the past 5 minutes; if so, do not X. If yes, X.

    Again, I have NO experience in this but an example I came up with is below; obviously I want it to be a bit more realistic as this is gibberish.

    [check X, <300

    [[X = 1 true

    [terminate X

    Hopefully that provided some of you with a laugh cause I know that's not really code. Any takers?

    submitted by /u/Anime-Porn-Star
    [link] [comments]

    Generalization / Specialization. When and where?

    Posted: 05 Aug 2019 10:07 PM PDT

    I've always been of the opinion that you should generalize your functions only when it's required and specialize when it is only being used for one use.

    This is under the assumption that you do not see any other use for the function in the foreseeable future. If you know you'll need it for other things later then I feel you should generalize just to save yourself the trouble later on. But generalizing without any foreseeable future case but making the assumption that there might be seems like you're adding unnecessary levels to your code.

    What are your thoughts?

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

    [Homework] I cloned to repositories and I can't push.

    Posted: 05 Aug 2019 10:01 PM PDT

    help please.

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

    Knight Search problem not working correctly. Need some OOP help.

    Posted: 05 Aug 2019 09:43 PM PDT

    Here's a link to the code:

    https://pastebin.com/PLLeVxjV

    I am able to curl the data, parse it, load it, and extract it into my array but I'm really struggling to understand why I am not getting a final array like this bit of code here that I am trying to emulate? https://ideone.com/SjlLWd

    There seems to be an issue with my storage
    instantiation but I'm not sure to be honest.

    Any help would be greatly appreciated!

    Edit: Here's a sample of the .txt
    file that I have created:

    ['younger', 'your', 'yours', 'yourself', 'yourselves', 'youth', 'zany', 'zeal', 'zealous', 'zenelophon']

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

    Where to start with JSON?

    Posted: 05 Aug 2019 02:57 AM PDT

    So, I can JavaScript a little (self-taught), enough to get myself out of trouble. But I need to know about JSON now. The issue is I have no idea where to start. I don't have a project to contextualise it all and was just hoping to find a codecademy or something course that would introduce me to the fundamentals and let me build from there. Am I entirely off track? Does anyone have any suggestions on where to start?

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

    No comments:

    Post a Comment