• Breaking News

    Monday, June 24, 2019

    Learning C first has made learning any other language SO MUCH easier learn programming

    Learning C first has made learning any other language SO MUCH easier learn programming


    Learning C first has made learning any other language SO MUCH easier

    Posted: 24 Jun 2019 01:09 PM PDT

    This may be just another appreciation post, but I have to get it out somewhere.

    I just started learning Python and I covered basic stuff working with strings, printing output, lists, tuples, sets, loops, if statements etc, and I'm just blown away by the simplicity of the language, I honestly cannot express enough how much easier it is comparing to C.

    For example, if I want to sort a list of integers in Python all I need to do is use sort() method on that list. In C I would need to implement an actual sorting algorithm such as Bubble/Merge/Insertion sort. Or if I want to find a min/max of a list. In Python there's already a function for that and in C, again, I would need to implement an algorithm for finding min/max element of an array.

    It might seem like I'm exaggerating, but at one point I wanted to cry tears of joy because of the pop() method. I remember pulling my hair out because I couldn't figure out how a linked list operates and how exactly is memory freed when using pop, but in Python all I need to is call pop() method and I'm set.

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

    Did I learn React wrong, is it normal to write it within an HTML file?

    Posted: 24 Jun 2019 09:45 PM PDT

    I'm going over a lot of the code I wrote for my React class last semester to try and see where I can build off of it, and finding something that seems peculiar. Aside from using the Expo.io website to write React Native, virtually all of the JavaScript and React code we wrote was embedded into an HTML designated file. Is this normal?

    If it isn't, I'd like to ask then are there any disadvantages to having learned how to write JS and React this way? Are there any ways to make the conversion process to a "true" ReactJS or JS file easier? I'd basically like to, if possible, avoid having to write HTML related code and focus on relearning and honing the syntax and style of writing for ReactJS and JS.

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

    Good easy API for beginners?

    Posted: 24 Jun 2019 08:26 AM PDT

    Pardon my English . I want to learn what APIs really are (I watched YouTube and Wikipedia and didn't help) and I thought to fully understand this I need to try one of these can someone suggest a good API for a first timer thanks!

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

    Mobile App Development - from scratch to a real life application

    Posted: 24 Jun 2019 06:59 PM PDT

    I am working as I.T. manager for a small organization, on the recent talks with management the idea to develop a mobile type application to improve and optimize some business process logic surged.

    However, I am the only one with a developer background mostly in C, C++ and the last two years on .NET (C#, MVVM, WPF, ASP .NET) and SQL databases.

    I have suggested that we develop this on a Web platform with a website and some services to exchange data with the database as I have experience with it and should be easy to manage for me. Management says as our technicians are always on the field, so are looking at having a small mobile application.

    Problem is that never worked on mobile development, I have been reading, but I am completely lost where to start, and I find so many languages, frameworks, IDEs, platforms, that I really do not know where to start. As developper I have learned that a good research and design is the best start point, so i wold like to understand where I should be starting.

    I would like to keep it simple and easy, its for internal use, does not have to look fancy or have massive user access as max would have 20 people login once daily. I am not really sure where to start, would appreciate some guidance.

    The app requirements are the following: shall have a Login screen (later external technicians would be able to access it), connection to a database where customers data will be stored and some basic data tables, and the users shall be capable to upload, download and edit data on the database from the app UI. Ideally should be cross platform (IOS, Android)

    I have seen some tools like Google Firebase, Zoho Creator, Flutter that could help to bind together the information and the exchange between the web server and the application. Do I really need these tools? Does these tools also help me out on the front end development and cross platform?

    Can people suggest me IDE, frameworks?

    If people know books or online tutorials on this please share it.

    Thanks a lot.

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

    Do you guys recommend VS code to practice programming in Java?

    Posted: 24 Jun 2019 10:04 PM PDT

    I've used it to practice c# and HTML ,it was quite useful

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

    Javascript HELP! Sorting Results in Descending Order

    Posted: 24 Jun 2019 09:01 PM PDT

    Hi all, I am a beginner to Javascript, and have been working on the below for 3+ hrs to no avail. Can you please help me make progress on the below?

    INSTRUCTIONS:

    Sort the results in descending order, based on volunteers needed.

    CODE:

    getResults: function (volunteers) {
    this.results = [];
    for (var i = 0; i < volunteers.length; i++) {
    var result = (volunteers[i].sort() + " additional volunteers are needed on " + dayOfWeek[i])
    this.results.push(result)
    console.log(result)
    }
    return this.results;
    },

    THANK YOU!

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

    pycharm wont let run os.system("clear")

    Posted: 24 Jun 2019 08:22 PM PDT

    Noob here, was working on a marquee exercise and one of the commands I need to run is os.system("clear") to clear the terminal every time I run a loop. however when i first ran it, it said "TERM environment variable not set". After defining the TERM in the run config by setting term to 1 in variables. After dong so the new error is that the "terminal database is inaccessible". Ive read through other forums that seem to be having the same problem but I cant seem to understand what is going on exactly.

    import os
    import time

    def main():
    content = ' please help -'
    while True:
    os.system('clear')
    print(content)
    time.sleep(0.2)
    content = content[1:] + content[0]

    if __name__ == ' __main__ ':
    main()

    this is what i am currently trying to run, i am on mac os

    Thank you in advance

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

    Will Code and Linux always be a practical career choice? Is it worth it? What do I do with my life? Please help me figure it out.

    Posted: 24 Jun 2019 06:06 PM PDT

    This has been on my mind for the past year or two and I really don't know what to do with my life. How long will coding/programming be a practical profession for? When will the robots take over and start doing the coding for us? Will coding/programming always be something that will be needed from people? The practicality right now is of major importance, and will continue to be for a while.

    I've been weighing the pros and cons. I intended to go to film school or something like that. Due to personal issues pertaining to health, it's been tough for me to continue my life. Coding is something I think about dabbling in, but it seems like a very boring tedious process. I imagine some guy looking at huge lines of code looking for the error. One error and it all goes to shit - that to me I don't know.

    On the other hand, I could join this amazingly huge community of Unix users who program. It could be something that gives my life purpose. It could be something to do every day by myself at home is learn how to code (Using something like Codeacademy) and learning about everything Linux-related.

    But on the other hand when it comes to Linux; there are 80 billion distros and I have no idea which one to use or start with. They all operate differently so I'd have to learn most of them (Or the ones I use), and over time learn which ones I like and don't like. It seems way too much and I'm overwhelmed with how much it is.

    Plus when it comes to Linux, what would I need it for? What do coders/programmers need Linux for? What is there about Linux other than "Privacy" and free/open-source. It sure as hell isn't compatible with a lot of things. I'm okay with my Macintosh but I'm still considering what this fuss with Linux is about. To one day convert completely to Red Hat or Ubuntu....or maybe even Arch (I use Arch) and be able to do everything kernel based. When I complete an operation in kernel and do it successfully....I'm not gonna lie, it fills me with glee.

    I love Mac because I love to edit and I'm not a gamer. I'd like to get into gaming but....I wanna spend the short time I have learning to make a career of myself. That's why I come to you guys in this Sub asking for your help and advice. All would be GREATLY appreciated. Also thinking about learning keyboard, which, like learning code, is tough but it gives me something to do and would give me a sense of purpose to do something great where I could make something great.

    On the other hand - Do I wanna learn to play keyboard and actually have a girlfriend eventually and not be a huge nerd? Or turn to the dock side?

    I think about all the stuff with coding and getting into the world of Linux, and then I see THIS MEME and I completely say "Fuck it".

    What do I do? Please give me advice.

    Thanks for reading.

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

    Imacros choose first picture in folder then delete it after it has been used?

    Posted: 24 Jun 2019 11:40 PM PDT

    I was wondering if it is possible to use imacros to choose the first picture in a folder then delete the same picture after your task is complete? I am not familiar with coding but I would like to learn more with imacros. Thank you for any help.

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

    How do people program for a long time and still maintain focus?

    Posted: 24 Jun 2019 11:12 PM PDT

    I've been learning programming for about 2 years now and I still feel tired and lost focus after 2 hours of work, and yet people work like 6 hours a day? How do you people do that?

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

    React Native vs. Flutter?

    Posted: 24 Jun 2019 11:11 PM PDT

    What's everyone's opinion on which one to learn in 2019? Should we learn only one of them or BOTH of them?

    Flutter seems to be the hyped choice, but upon an Indeed search, there are very very few jobs in Flutter.

    Whereas React Native, there are a decent amount of jobs, significantly more than Flutter.

    Should we be going for the one that gets us the job or going for the one that is more hyped?

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

    How to take python text adventure to the next level?

    Posted: 24 Jun 2019 11:02 PM PDT

    Been learning to code in Python for about a month, working through CodeAcademy and Learn Python the Hard Way. Made a simple text adventure game with Python that runs from PowerShell with the player inputting choices based on the corresponding number.

    What I would really like to do is have a graphical interface with choices represented by buttons which can be clicked on by the player. Taking this further perhaps by adding images depending on the scene or choices made.

    Would I need to learn HTML, CSS and JavaScript to accomplish this? Are there any helpful resources to learn how to bring different elements/languages together? Any pointers would be very much appreciated :)

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

    Critique my example of an adaptor pattern (in PHP)

    Posted: 24 Jun 2019 10:52 PM PDT

    Took a while for me to get this and I'm not sure my understanding is complete so here goes:

    A checkout class that injects Paypal as a dependency will have trouble if it wants to expand into multiple payment options, adding Stripe for example. To get around this we would first remove the Paypal injection and replace it with a sort of generic placeholder:

    class Checkout { public function masterRunPayment(PaymentProcessorInt $processorClass, $user, $paymentDetails) { $processorClass->verify($user); $processorClass->charge($paymentDetails); } } 

    Now we'll setup the placeholder aka interface:

    interface PaymentProcessorInt { public function verify($user); public function charge($paymentDetails); } 

    There are no function bodies above.

    Next we'll configure our own classes to interact with the real processor APIs by wrapping the API's members around our presets in the interface

    require_once (PROJECT_DIR . '/vendor/autoload.php'); use /Paypal use /Stripe class PaypalApiHandler implements PaymentProcessorInt { public function verify($user) { $paypal = new Paypal(); $userEmail = $user->email; $currentAccount = $paypal->checkIfHasAccount($userEmail); <continues...> } <another method for charge()...> } <another class for Stripe mimicking the above...> 

    The configurations are now set. From this point an Xhr call from the front end would call a handler on the back end that would create an instance of the Checkout class and pass it a Paypal or Stripe object, and then run the instance's master payment method.

    // ajax controller file function handlePaymentRequest($paymentDetails) { $checkout = new Checkout(); $paymentSuccess = $checkout->masterRunPayment( $paymentDetails->paymentMethod, $paymentDetails->userDetails, $paymentDetails->cardInfo ); <continues...> } 

    Is that all correct or did I get something wrong? Thanks

    Edit: I'm seeing some flaws

    • Should I set the interface in the class instead? I'm thinking it would look like this:

    class Checkout { protected $processor; public function __construct(PaymentProcessorInt $processorObject) { $this->processor = $processorObject; } } 

    • In the final step I don't think I can pull a Paypal or Stripe object out of the request. So would I need to use a conditional like so:

    function handlePaymentRequest($paymentDetails) { $checkout = new Checkout(); $paymentObject; // string to object conversion if ($paymentDetails->paymentChoice === 'Paypal') { $paymentObject = new PaypalApiHandler(); } $paymentSuccess = $checkout->masterRunPayment( $paymentObject, <continues...> ); 
    submitted by /u/embar5
    [link] [comments]

    Problem with Recursion in python

    Posted: 24 Jun 2019 10:52 PM PDT

    I'm taking a programming tutorial and i understand how the factorial function is working in python, but what i'm having trouble is with the power function.

    def factorial(num): if num == 0: return 1 else: return num * factorial(num-1) 

    since there's only 1 variable in factorial i understand that num * num-1

    for this power function which take num 5 and raises to the power pwr.

    def power(num, pwr): if pwr == 0: return 1 else: return num * power(num, pwr-1) 

    how does the function know to multiply num * num and not num*num*pwr-1.

    Power wasn't explicitly defined as num*num if pwr is less than 0.

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

    Is it ineffective to learn C++ as first programming language?

    Posted: 24 Jun 2019 10:47 PM PDT

    Just as quite some other people, interest in game development got me into programming a little. I've just started screwing around with C++ and getting comfortable with it, as I've been reading that it's widely the most common language used in game development.

    Now, however, I've also seen people talk about how it's supposed to be a hard language to learn. Should I focus on another language first to really get into programming as a whole?

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

    Hobby project with facial recognition

    Posted: 24 Jun 2019 10:39 PM PDT

    Hi all, not quite a "how do I program" question, but I think it's related.

    Basically I want to write a system that thats a bunch of photos at one end, and spits out an ordered collection of photos all grouped by faces in those photos. I.e, I give it 10 photos, and it shows me which faces are in those 10, and which photos each face is in (lets you find yourself in a large album of photos).

    But, if I ever want this thing to be a useable product, I need to answer the question around legality. Is that kind of application of facial recognition legal? (I'm in the UK btw).

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

    Choose language

    Posted: 24 Jun 2019 10:37 PM PDT

    When should you choose your programming language? I have basic skills on a lot of them but don't specialise myself in one.

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

    When you first started to learn programming, did you immediately fall in love?

    Posted: 24 Jun 2019 04:24 PM PDT

    Everyone tells me I must love what I do, and I totally agree. I like programming, but I am not sure I love it. I know it will always be around and having your foot in the door is a major boost for your own social and economic standing. I like to code. It is interesting to me and very challenging. Through my years in school I have never gone across something more challenging than programming. It makes me want to be an programmer. I try to spend a lot of time coding, but I never seem extremely motivated to do it everyday for long periods of time. Were you the same or have you always had this drive inside you that wants to code? I want to keep at it because I know it will be a useful tool. Is there any advice you can give me? Thank you.

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

    [Possibly?] Another success story.

    Posted: 24 Jun 2019 10:29 AM PDT

    So I just got offered a job offer as a Jr/Trainee dev in a small software factory startup (around 15-20 ppl).

    I say possibly cause I dont want to jinx it but I would be starting soon in july.

    So I am a typical mid 20's computer dude. Always loved them, grew up with them and eventually got interested in programming.

    One thing you should know about me is that I am a professional procastinator. It has always been very very difficult for me to focus on my studies, even in high school. Only recently I started to pursue a higher education related to CS and it is proving challenging without the study habits that a lot of people have from high school.

    So if you are like me, I dont think there is a magic bullet, you best bet is to follow highly structured tutorials like freecodecamp OR try making games/apps/whatever you actually would like to do in the future. I still struggle with it, and I believe I will all my life regardless of what happens in the future but I just wanted to let you guys know that you are definitely not alone on this and that you can still succeed in spite of it.

    Resources that most helped me up until now

    To this day the best resource in my opinion from all of the ones that I've tried is the helsinki java MOOC. I always think back to that tutorial and how well made it was for a beginner to follow and learn important object oriented concept really quickly.

    Freecodecamp is very very good aswell and honestly probably the quickest way to find a job is to really dig into it and try to get a front-end entry level position where you'll be working with layouts and stuff like that (seems like I mostly got called for those positions when I was searching).

    And lastly I would heavily recommend at least for the backend portion of it (didnt follow the front end part) Colt Steele's web dev bootcamp in udemy. There is a more modern version but I can only talk for the old one which teaches you node + express and it was very very good and probably taught me the most overall out of all three resources.

    If I manage to go from a factory job to getting offered a job as a dev, ANYONE can regardless of if you procastinate or dont have much time. I've always worked a 9-5 throughout my self-taught path. I dont have kids but its not like I was studying 6 hours a day or even 4, my procastination took care of that. Some days I would do just 25 minutes, others a few hours. When I got really into a personal project I could go all night but those isntances are few and far between.

    So I guess you can ask me anything, I just wanted to give some encouragement especially to those struggling with procastination because I understand completely.

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

    How can I practice programming between semesters?

    Posted: 24 Jun 2019 09:44 PM PDT

    I recently switched my major from engineering to something more related to computer science because I wasn't enjoying it like I'd thought and enjoyed one of my introductory programming classes. The problem is that I don't really know what to do on my own. I do great on all the homework and projects, but if i want to practice and dive into it, I have sort of a writers block. I've done some intro stuff in Java, C++, and Python. What IDE should I use?

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

    Has anyone got a job using udemy courses?

    Posted: 24 Jun 2019 09:31 PM PDT

    Seems like a huge waste, I took a few web dev courses and made a number pages but couldn't get in anywhere.

    Recently started taking an android course but has anyone gone from zero to professional using Udemy?

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

    Suggest me an app to showcase my java spring boot knowledge

    Posted: 24 Jun 2019 09:12 PM PDT

    I've been learning Spring boot from the past few weeks. Before that I mostly worked on hardware projects and my mind is fixated on solving hardware based automation problems. I cannot think of a good problem that can be elegantly solved by a web app using Spring boot, or any problem that software can solve really. I know it sounds idiotic when there's a whole industry revolving around it and I myself have a degree in it, but I feel I'm just facing a sort of writer's block right now.

    Usually in my work people just make the general Todo apps, or Survey app and move on. But I want to do something a bit more effective. It'll be great if you could suggest me something that I can develop quickly to learn, as well as showcase whatever I learnt.

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

    [Help] Font cant upload to NeoCity

    Posted: 24 Jun 2019 09:03 PM PDT

    I have problem uploading my custom font into Neocity as it require us to become a supporter which cost $ 5 per month. However this is for my school project but I doesn't want to pay for it work. Are there any way that I can bypass this by using other alternative method but still using neocity as my source of website? Thank you so much , I am new to here so I am desperate to find some help.

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

    No comments:

    Post a Comment