• Breaking News

    Tuesday, October 6, 2020

    Why is checking to see if a variable exists bad practice? Does this matter at all when debugging? Ask Programming

    Why is checking to see if a variable exists bad practice? Does this matter at all when debugging? Ask Programming


    Why is checking to see if a variable exists bad practice? Does this matter at all when debugging?

    Posted: 06 Oct 2020 03:03 PM PDT

    Trying to get to where my code isnt working I will use an IF statement that looks something like this,

    If "foo_var_name" in locals(): #check to see if variable exists

    If foo_var_name== 42: #stop at the line I need to look into

    Print("look here")

    With my debugger stopping on Print.

    Ive read this is bad practice, so I'm curious why. That said, I'm only using it for debugging purposes now. Is there any issue here?

    Bonus: Why shouldn't I use this in production as logic that executes ONLY if a variable has already been created?

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

    Subtraction and division in bison

    Posted: 06 Oct 2020 05:33 PM PDT

    I am completely lost here, I have the following and have been asked to add subtraction and division but I just dont understant it whatsoever. Please can someone help?

    lines : line lines | line ; line : expr NEWLINE { BINARY_TREE ParseTree; int result; ParseTree = create_node(NOTHING,NEWLINE,$1,NULL); result = evaluate(ParseTree); printf("value : %d\n", result); } ; expr : expr PLUS term { $$ = create_node(NOTHING,PLUS,$1,$3); } | term { $$ = create_node(NOTHING,EXPR,$1,NULL); } ; term : term TIMES factor { $$ = create_node(NOTHING,TIMES,$1,$3); } | factor { $$ = create_node(NOTHING,TERM,$1,NULL); } ; factor : BRA expr KET { $$ = create_node(NOTHING,BRA,$2,NULL); } | NUMBER { $$ = create_node($1,NUMBER,NULL,NULL); } ; 
    submitted by /u/HoooooWHO
    [link] [comments]

    What is the best alternative to Stack Overflow?

    Posted: 06 Oct 2020 09:09 AM PDT

    Any FREE alternatives out there? "From my experience, SO can be pretty toxic and condescending to new users even if they do their best to follow the guidelines and ask quality questions. Quite a lot of arguably unique questions get marked as having already been answered, and there is not a good process for rebuttal. Questioning the system gets downvoted punitively"

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

    What size codebase is too much for one person to manage on their own?

    Posted: 06 Oct 2020 02:14 PM PDT

    I have developed a MERN web app and API that altogether, probably comes to about 30K lines of code. Now I've written it all by myself and pride myself on how the structure for the code has made it very easy for me to manage on my own.

    I'm a self taught developer and have never had a real developer job, so I'm wondering, how much code is roughly too much for one person to properly manage? My guess is that after 50k lines my the codebase is going to start to become hard to manage

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

    Process of putting a game on a website?

    Posted: 06 Oct 2020 04:19 PM PDT

    So I understand, you can create a game pretty easily in any language, python, cpp, etc.

    But how do you then get these games to run on a website? Take, I'm sure you've all heard of, Agario, for example.

    What I don't understand is how these games run on the web. Python/cpp when compiled lead to machine code. How is this machine code then linked and displayed to a website?

    Or maybe I have the wrong idea, and instead these games are written in JavaScript?

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

    Where do I put environment variables if I want them to be loaded when opening files through the finder. My variables are only active if I open the python file from terminal.

    Posted: 06 Oct 2020 09:43 PM PDT

    I have environment variables and path set in ~/.profile.

    My ~/.zshrc contains 1 line: source ~/.profile

    With this my variables only load when I open files through the terminal. If I click on files to open them the env variables will not be loaded.

    So I added everything from ~/.profile to ~/.zshenv as well, but that didn't seem to help.

    What should i do?

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

    How does machine learning fit in the pipeline of development?

    Posted: 06 Oct 2020 05:45 PM PDT

    I've always wondered how ML fits in the pipeline of development.

    Say I want to make an android app involved with it. Is it coded into the same space as my other java code for android?

    Training is a part of the process, is it done before the actual app is coded? As in, the data is trained separately like on python in a desktop pc maybe, I always imagined that was the case and that you obtain a "trained data" file or something like a database that you then slap into the android app.

    Is this correct? What's the process of training (before, after or during development) and how is this data used exactly?

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

    Is there a general framework to help iron out test cases?

    Posted: 06 Oct 2020 08:38 PM PDT

    I come from an engineering background, and one of the tools we learned early on was the 5 Whys to help us determine a root cause.

    Is there an analogous method in software testing that helps dig deep and map out cases for any arbitrary test?

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

    I’m familiar with the basics of Object Oriented Programming with C#, where do I go from here to learn the intricacies of web development using Visual Studio Code?

    Posted: 06 Oct 2020 02:32 PM PDT

    What is your workflow like?

    Posted: 06 Oct 2020 05:11 PM PDT

    I have been programming for about 4-5 years and I was wonder how other people go about building a piece of software? What programs/ techniques do you use to design your code and how do you go about organizing your objectives?

    Personally I start with writing everything I want the piece of software to do in an Ever Note document along with what needs to be done for my minimum viable product. I then make a Trello for the project and write down my To Do, doing and done. I'll usually use GitHub to do version management and depending on what language i'm working in i'll use either Atom,PyCharm, IntelliJ or VS Code to write the code.(and it depends on my mood LOL)

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

    anyone want to join My game Programming devlopment SLACK channel , please DM me.

    Posted: 06 Oct 2020 04:43 PM PDT

    Good Database Type for storing large hashes/dictionaries?

    Posted: 06 Oct 2020 12:44 PM PDT

    Suppose I wanted to store a large dictionary with lengthy keys (e.g. a key would be a 20 character alphanumeric string) and the value would map to a object of variable type. I want fast lookups and retrieval and persistent storage

    What would be a good database for this?

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

    ARM Macbooks -> Professionals ditching Macs?

    Posted: 05 Oct 2020 11:10 PM PDT

    Please correct any incorrect info.

    I see that some people are using Macs for 'programming', and say good reasons about it.

    But I am worried about Apple switching their Mac lineup to ARM. The computer industry is still used to x86 workloads, and programmers need to compile their programs based on x86 systems.

    And developer tools are still on x86, which means it would be a pain in the ass to use an ARM laptop for programming.

    To add insult to the injury, all Mac programs will now be required to be signed by Apple, thus locking down the options for programming tools.

    This will lead to many programmers ditching Macs and opting for Windows(and lose iPhone market share in the process too).

    I cannot understand what Apple were even thinking with their ARM Macs.

    Will Apple lose the professional market with this transition?

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

    Please read and help! I need to support my family in a short time. ($220/month). I need everybody's opinion

    Posted: 06 Oct 2020 03:03 PM PDT

    Hi. I am a computer engineering student. This week, I started the third year. Unfortunately, some negative / bad situations have developed in my life. Now I have to earn enough income to support my house. If I earn $ 220 a month, I and my family won't need anyone. I don't have the ambition to make a lot of money. ($ 300 minimum wage, my country: Turkey). (I hope nobody gets to know me. I'm ashamed that I opened for such issues). I've had an accident in the past (on a bike ride to work). I have orthopedic problems. So getting into unskilled jobs and working is wearing and painful for me. Unfortunately, I did not improve myself except for the homework given at school. I did not choose a field for myself. I did not go deep and improve myself. (web , mobile , desktop , cybersecurity , gaming etc. )

    I want to earn dollars by doing simple freelance work. (Related to my profession if possible.) But I don't know enough programming to make money. What area of ​​interest can I quickly generate value in? And I can get in a position to earn a little money What programming language and job can I make money with? (In a short time) Do you have any advice?

    (Note: Some courses I have seen in the past 2 years at the university. C programming language, C # programming language as an object-oriented course. Detailed use of html, css, js. Office programs as a web programming course. Database management (access and sql). And also data structures. My level of knowledge decreases day by day, as I do not look at their faces again after giving lectures. However, I can work and compensate when I need it.)

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

    What could a beginner/intermediate create with a lot of dedication?

    Posted: 06 Oct 2020 10:52 AM PDT

    By learning programming would it be possible to build things that work from the start with trial and error and dedication without having acquired years of experience ?

    I still don't understand the complexity behind programming, web applications that appear simple and straightforward have like more than 100 developers behind them.

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

    What's the deal with Kali Linux

    Posted: 06 Oct 2020 10:48 AM PDT

    I see people making jokes about Kali Linux on r/masterhacker and r/ProgrammerHumor. I didn't know what it was, so I did some research and it seems like a pretty legit OS. Why are people making fun of it?

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

    Can I connect an app to the heart rate sensor in an Apple Watch or other similar devices?

    Posted: 06 Oct 2020 12:39 PM PDT

    Hi, I have an idea for an app but I have no clue how to code and I just wanted to see if I could get a question answered. Is there a way for me to build an app that could connect and use the data from a heart rate monitor that is built into a Apple Watch or a similar device? I know that the watch itself can read a heart rate but I was just wondering if I could connect it to my app? Thank you for your time!

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

    I hate Python!

    Posted: 06 Oct 2020 03:58 PM PDT

    Front end developer here. I have used Java in the past and loved it, debugging was easy, maven was not too painful and and error traces were detailed and helpful.

    Python seems awkward to debug, I hate pip and pipenv with a passion and it's trace backs are usually not helpful because the issue oftentimes is a dependency issue. I just wanna cry, why do people use this language?...

    submitted by /u/Paul-Canada
    [link] [comments]

    How can I program my application to Using HTML, PHP, CSS, and Javascript to create login system?

    Posted: 06 Oct 2020 07:08 AM PDT

    I've managed to successfully store user information (username, email, and password) in a database (MySQL) on a server (Apache), but am not sure how to select that particular user to store their comments on the same database.

    Is there something trivial I am missing?

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

    Need Advice regarding a book

    Posted: 06 Oct 2020 04:50 AM PDT

    I happen to have a book called " Web Enabled Commercial Applications Development using Java 2 " by Ivan Bayross I m a newbie in java and want to learn the language and application development part . Can someone who is familiar with the book it the language tell me is it a good book for a newcomer or a advanced Book shall I proceed with this book or not.

    Advice to a newcomer regarding learning java is also appreciated.

    P.s. I m not a very good programmer j just have programming knowledge of the python libraries that are required for Data Science and Machine Learning.

    Thank-you in advance.

    submitted by /u/Johann-liebert
    [link] [comments]

    Whats the max size for a .png with a certain resolution

    Posted: 06 Oct 2020 06:32 AM PDT

    If I have an image with 1280/720 px and I assume that we have the worst case in terms of compression. Is the max file size given by the resolution * 3 (r,g,b) * 8byte?

    So in this case 1280 * 720 * 24 = 2211840 byte or 2.2 MB?

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

    Ideas for a python project at university for beginners/mid-experienced people

    Posted: 06 Oct 2020 04:03 AM PDT

    hello there, i'm looking for ideas for a python project for beginner/mid-experienced people at university. Could you help me out?

    thank you in advance ;)

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

    Can someone explain this part about intellectual property of my new contract

    Posted: 06 Oct 2020 05:47 AM PDT

    This is part of my new contract under "Intellectual Property".

    I am wondering if this applies to any side projects I may or may not have been/decide to start working on. Does it apply to side projects and what if I don't disclose any potential side project?

    1. You acknowledge and agree that:

    (i) if in the course of your employment you create, discover or produce or participate in the creation, discovery or production of any works, materials or inventions of any sort in any medium whatsoever whether known about at the date of this Agreement or otherwise ("Works") then you shall notify the Person to whom you normally report in writing and all intellectual property or other proprietary rights of any sort (including but not limited to copyright, patent right and design right) in and to the Works shall be and remain the absolute property of the Company or any relevant Associated Company and by signing this Agreement you hereby waive irrevocably to the fullest extent possible by law, any right whatsoever (including all Moral Rights (as defined in Chapter IV of Part I of the Copyright, Designs and Patents Act 1988) and other similar rights) in and to the Works (and any part of them) and you hereby assign, including by way of present assignment of future rights, any right whatsoever in and to the Works to the Company (or, where so advised by the Company, the Company's nominee) with full title guarantee free from all encumbrances and third party rights;

    (ii) the Company and any Associated Company shall be entitled without any further consent or payment to use, reproduce and exploit throughout the world in all media (whether now known or invented later) the results and proceeds of your employment without regard to whether such use, reproduction or exploitation occurs before, during or after the termination of this Agreement and you hereby grant all such consents as are or may be necessary to enable such use, reproduction or exploitation; and

    (ii) you will do or execute and/or procure the doing or execution of all such acts and documents or things as may be necessary to give full effect to the provisions of this paragraph 26.

    1. You acknowledge that the Company in its sole and absolute discretion shall decide the extent, if any, of the protection sought in relation to the matters referred to in paragraph 26. Accordingly, you shall not (whether during or after this employment) apply or join in applying

    for any patent, registered design, trade mark or other equivalent protection in connection with the matters listed in paragraph 26 without the prior written approval of the Company.

    Help is appreaciated!

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

    Website making

    Posted: 06 Oct 2020 02:59 AM PDT

    Do people still make websites codeing it by hand? Or they use other programs?

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

    No comments:

    Post a Comment