• Breaking News

    Friday, February 12, 2021

    Just a simple piece of advice as I code more every day. learn programming

    Just a simple piece of advice as I code more every day. learn programming


    Just a simple piece of advice as I code more every day.

    Posted: 11 Feb 2021 10:01 AM PST

    I noticed when I first started learning to code in school, I had this assumption that people coded "fast", as in typing brand new code from scratch quickly. I just wanted to let people know who are starting out that this isn't always the case, and that you shouldn't worry about it. It's far more important to understand what you're wanting to code before you code it. That takes time and patience. I notice I write much better, more accurate code when I am calm and take my time to think about every line I write and what it's doing. Segmentation is key! Break EVERYTHING down to it's simplest form, and don't panic when you feel stupid or think you're still on an "easy" lesson. Coding has taught me patience more than anything else in my life. If you can enjoy the ride as much or more then the actual outcome (because you should know the desired outcome intimately by that point) then you are on a good path. Happy coding!

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

    How do you remember what you learn when learning a programming language?

    Posted: 11 Feb 2021 09:56 PM PST

    Basically the question in the title. What helps you remember?

    Do you take notes on what you learn as you go, or are you supposed to code until you remember what it is you just learned or is it better to refer back to a book/website that goes over the concepts and specifics of the coding language?

    I'm just curious because I've tried taking paper notes in the past and it hasn't been really all that useful.

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

    How to be faster?. Am I slow or is it just too much?

    Posted: 11 Feb 2021 04:46 PM PST

    I'm given a list of three to four requirements a day, usually I will get done one, and that is on a productive day.

    For example today I was tasked with refactoring a semi-complex Laravel project which took me around 5 hours not counting breaks. Around two hours of that time I spent delving more into the Laravel documentation and trying to get it to follow SOLID priniciples. I made several request validation classes when I'm the only one ever setting up the requests.

    There isn't enough time for me to learn unit testing, docker, or any of the other industry standard practices and honestly I feel embarrassed for not using them.

    Ofc my employer doesnt gaf about this and just wants code that works ASAP but I cant compromise between readable efficient code and delivering on time, is one or the other.

    I should add Im the only dev in the team and we work five projects. I have no idea if this is something I should even complain about because there are no other devs around me that I can compare myself with.

    I feel like I spend too much time caring about standards when irl nobody ever cares and just churns out thousands of lines a day and still get paid more than I do

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

    Self-learning python for a week already. Should I learn C?

    Posted: 11 Feb 2021 09:02 PM PST

    I have around 2 semesters before I enter IT in our university and the reason I am self-learning python is to know some background about programming and python itself however I just knew right now that our university is teaching C first. So should I just continue to learn python since I'm kinda enjoying it or go learn C?

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

    What are some good projects to do as an intermediate Python programmer?

    Posted: 11 Feb 2021 08:23 PM PST

    I am currently in the process of learning Python and would like to start doing some projects on the side to develop my coding skills. I'm am currently learning about different data structures and their implementations if this helps give an idea of where I currently am at. What would you all suggest?

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

    Programmer calculator and LL parser made in C from scratch

    Posted: 11 Feb 2021 06:50 AM PST

    A week or so ago, while I was developing a gameboy emulator I decided to make a special calculator to help with all the low level logic.

    This proved to be a really interesting project and made me implement an LL parser and design a grammar for all the operators I wanted to have.

    Since I learned so much while doing it I saw the opportunity to create a separate, much simpler example of the parser (and it's use to evaluate expressions) written in C - that might be a great starting point for someone who might be interested in learning parsing to use in their own projects (https://github.com/alt-romes/calculator-c-parser)

    The code for the calculator (made for developers working with low level and multiple number representations in the terminal) and the parser it uses is also open source so if you're interested in seeing how the relatively more complex one is done (or if you're interested in a terminal programmer calculator) you can, here https://github.com/alt-romes/programmer-calculator

    Thank you :)

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

    The language that would allow me to do the most...

    Posted: 11 Feb 2021 09:41 PM PST

    I'm about to choose a language to start learning. However, the choice is difficult because there isn't one single thing i want to do over everything else. In fact, i have a bunch of projects i'd like to do, but i'd love to be able to go as far as possible with one single language. So, basically, the situation is this:

    - I wanna build things all by myself. At least in the beginning. Whatever i learn, it has to allow me to create a deployable app by myself.

    - I have designing skills, both 2d and 3d. At some point i'd like to somehow incorporate them in my work.

    - I like automation. I wanna build some automation tools. But i also have plans to build websites, web apps and would also like the ability to eventually make something for Android.

    - I wanna build mostly things that i can share with others. Mostly web and desktop.

    - Whatever i choose, it can't be a bad choice for AI, since that is also something i want to do.

    - I will eventually try to build a game too. I think this is the perfect project to use my 2D and 3D modeling skills in. At least i think.

    And that's basically it. I'm aware evetually i will need to learn more things, but i just wanna know which option would allow me to accomplish something with the least addictional languages as possible.

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

    How much learning do you do on your work hours?

    Posted: 11 Feb 2021 07:18 PM PST

    I landed an internship with a startup on full stack development, but its remote for the foreseeable future owing to the current situation.

    The first real piece of work I was assigned was to create the frontend in React for a standalone portion of an app. We went through the wireframing and I went ahead with my work. The issue is, its not any different than what I would do if I started a personal project.

    I'd do the research and I'd have to figure out the approach to the design. Am I missing something here or should there be more involvement from the people that hired me?

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

    Web apps or data science?

    Posted: 11 Feb 2021 09:26 PM PST

    Hi there,

    For about 5 months I've been learning to code. I'm a bit torn between two paths which have different interest levels and career prospects so was hoping to get some perspective from learners and working engineers.

    On the one hand I am probably most interested in data processing, manipulation and analysis. I have learnt python syntax, sql and how to parse and store data to/from excel, csv, shelve files and web scraping with beautifulsoup. I'm building a quiz application that draws on large amounts of language data and as a long term goal would like to create something with nlp akin to Duolingo, which has a backend based on python.

    Still very early on in this path. Alot of the jobs in this field in Japan are machine learning and I don't have the mathematical/algorithmic skill for that yet. Others seem to require me to learn c and Java.

    While there are jobs python in Japan, there are far far more in web development. Individual frameworks have more search hits than the language python.

    So I've learnt the syntax ruby (which is so similar to python it doesn't even feel worth mentioning, except that I can combine with rails) and am also learning JavaScript, which is incredibly versatile compared to python. If I know JavaScript + a framework (or for that matter, ruby on rails) I feel I will have alot of flexibility when applying to jobs.

    I'm far from uninterested in js. Apart from mastering data I'm also really interested in user interaction. But right now I'm not as interested in front end development as a whole. Not sure why exactly but I feel that way however I believe front end relies on creativity as much or more than the technical skill. I can learn technical skills but creativity is fickle and subjective and is more of a talent than a skill.

    Maybe my feeling on this will change when I actual build a website. And I would really like to create something friends and family can use, rather than just run myself from the command line. I need to eventually create a front end even if just for my own projects.

    For about 6 weeks I've been learning js and python + data science at the same time (on codecademy mainly) and I feel it's better to focus on one or the other for now. So my question is: should I focus on learning js plus a framework or should I flesh out my backend/datascience skills?

    What do you think?

    For background: I'm 30, majored in English literature and worked in non-technical fields since graduating. I have what recruiters would call a "jumpy cv" as I've changed jobs a few times. Will be working in Japan which is quite conservative about job changes so really I need to stay in my next company for a long time.

    Tl;Dr: should I focus on the more motivating but less job friendly datascience/maths/python route or learn a framework to build out some basic apps(web/desktop/mobile) for which there is much more demand.

    Thank you!

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

    What's the best language for running scripts that interact with a webpage?

    Posted: 11 Feb 2021 06:44 PM PST

    As an example, I'd like to write a script or function that takes arguments to be used as inputs in Baseball Savant's search function, then downloads the query results as a CSV file (there is a button in the row header to do this). I'm familiar with java and HTML, but I've never used javascript. I know it can be used to write scripts for HTML documents, but not if it can interact with existing HTML pages. Any input is appreciated.

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

    Where to create code assignments that test if the submitted code is correct?

    Posted: 11 Feb 2021 08:36 PM PST

    I know that repl.it has this feature but it's not free anymore.

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

    Should I learn C, C++, or Java?

    Posted: 11 Feb 2021 06:14 PM PST

    I have learnt Python and I am looking to learn a lower-level language to add to my skill-set. I cannot decide which language to go with: C, C++, or Java.

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

    Python Code Breaking with != but not with == | Discord Bot Client

    Posted: 12 Feb 2021 12:04 AM PST

    Hey everyone,

    I'm writing code that goes into the HTML of a website, strips the text between its tags, and does stuff with that information. I'm running into a problem where, I've created a loop so that, every 5 seconds, there will be a new "grab" at that website to make sure the information is always updated. To do this, I'm trying to create two lists (one list of titles on the web page at the beginning of the loop and another list of titles at the end of the loop). I want to see if, the next time the loop runs, if the old titles are different than the new ones, send a message to the discord channel.

    channel = client.get_channel(123456789) @tasks.loop(seconds=5.0) async def scrape(): global linksAndTitles global pbe_titles global currPatch global allTitles global recentPatches global firstTitle global client global channel temp = [] URL = "the-url-im-working-with" page = urlopen(URL) soup = BeautifulSoup(page, 'html.parser') pbe_titles = soup.find_all('titles', attrs={'class': 'news-title'}) print(firstTitle) for tags in pbe_titles: temp.append(tags.text.strip()) temp_list = '\n'.join(str(line) for line in temp[:1]) print(temp_list) if temp_list == firstTitle: print("True") elif temp_list != firstTitle: print("false") channel = client.get_channel(123456789) await channel.send('Message') # deletes contents so loop doesnt append at every iteration linksAndTitles = [] for tag in pbe_titles: for anchor in tag.find_all('a'): linksAndTitles.append(tag.text.strip()) linksAndTitles.append(anchor['href']) firstTitle = '\n'.join(str(line) for line in linksAndTitles[:1]) 

    The problem is with the loop:

     if temp_list == firstTitle: print("True") elif temp_list != firstTitle: print("false") channel = client.get_channel(123456789) await channel.send('Message') 

    At the very first iteration, temp_list should not be equal to firstTitle thus resulting in the discord printing to the client, however, I only receive the error: 'NoneType' object has no attribute 'send'

    Now, if I wanted to do

     if temp_list == firstTitle: print("True") channel = client.get_channel(123456789) await channel.send('Message') elif temp_list != firstTitle: print("false") 

    Then there's no issue at all. Only the other way around. Please help as to why this is occurring.

    As a side note, I've messed around with only declaring the channel inside the loop, not using global client etc, those don't fix it.

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

    How do I structure the folders in my project?

    Posted: 11 Feb 2021 04:16 PM PST

    Hello all. I am new to Java and working on a personal project. Nothing crazy. It's a web app that has a Java backend that gets and stores data in a database. I am using Spring Boot to set up my backend as an API. My question is, how do I set up the folder structure in my project? This is the first time I am ever doing a project that uses multiple languages and a framework so it's a little confusing.

    Here's how it looks right now.

    For example, where do the HTML/CSS/Javascript files go? Can I just toss all of them in src/main/java? Do I make sub folders in main called html/css/javascript? Any clarity would be much appreciated.

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

    How does one learn Theory of Computation efficiently?

    Posted: 11 Feb 2021 04:00 PM PST

    I'm having a lot of trouble with theory of computation. I have the Sipser book which explain the concepts well, but when my professor give me much more harder and abstract questions, I'd be stuck for days. Usually with subjects like Calculus, by grinding enough questions I'd understand it and by that point it's just plugging different numbers, but Theory of Computation is very abstract and I'm really weak in those subjects where they want me to prove something.

    So far my current plan is to practice as many examples as I can, but I don't know if this will be enough for the more abstract examples. Any resources or study methods that could help me?

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

    Are there any programming languages, framworks, editors that have a good way of showing the efficiency of a programm?

    Posted: 11 Feb 2021 11:12 PM PST

    There are many ways to programm a task, but not all are done in the same time.

    If I write code and it is running I have no clue how fast it actually is and how to improve it. I could write speed tests and check different implementations but who tells me that I have used the fastest methods provided by the language/framework in the first place. Sure I could dig in each source code and calculate the speed or ask stack overflow. But for every single method?

    I know that there is no such algorithm that can check for every programm if it will stop on a specific input. Therefore it's probably also not possible to calculate the speed of every given algorithms. But for many it should be possible.

    What I am thinking of is something like worst-,best-speeds of every method (depending on its input and maybe even system structure/speeds.) and when using the method it will display those numbers and try to calculate it for the new method.

    In the end it would be 'very easy' to decide which methods to use nd to write to get the best efficiency.

    Does something like this exist? If not, is this idea stupid/ are there better ways?

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

    I just learned about Phrase Express and want to know what I can do to better understand it and use it for my work

    Posted: 11 Feb 2021 11:11 PM PST

    I am a physician and have absolutely enjoyed learning how to use phrase express to make my job easier. When I go on the phrase express forum I feel like I am reading another language. I assume there are guides and books that are geared more towards what phrase express does with its form creations. Are there any suggestions or recommendations?

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

    Is it possible to create a csv file automatically?

    Posted: 11 Feb 2021 11:10 PM PST

    My way of creating csv file is manually. I am creating a new file and then code it right after. I want to do it automatically, like everyday it will create a new csv file.

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

    Can't think programming way

    Posted: 11 Feb 2021 10:44 PM PST

    What is the thought process of a programmer , when he started to building a project or solving a problem.

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

    Why would my code be wrong if the program runs correctly?

    Posted: 11 Feb 2021 10:35 PM PST

    I'm in my first programming class, C#. Our assignment this week was to basically program a distance calculator and mine worked without problems but the professor gave me a 50% I think because I didn't "declare" things? I don't even know what that means or why it matters if the program is working.

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

    Wont let me compile because no return statement

    Posted: 11 Feb 2021 06:46 PM PST

    If the user enters a certain index I want it to return that index but it's saying no return statement found, which I assume its because it's in the if statements

    here is the code:

    public static int printBookOptions(Books[] arrObj) { int index; do { System.out.println("Enter index for bookname"); index=Integer.parseInt(input.nextLine()); if(index==1) { return index; } else if (index==2) { return index; } else if (index==3) { return index; } else if(index==4) { return index; } else { System.out.println("ID not found"); } }while (index!=1||index!=2||index!=3||index!=4); } 
    submitted by /u/fucadav
    [link] [comments]

    The question regards 2D array in Java

    Posted: 11 Feb 2021 10:29 PM PST

    how will the for-loop looks like if I what to print the 2D array in one line within the order of top to bottom and left to right

    Ex:

    1 2 5 8 7

    5 9 1 2 4

    print out to be "1529518274"

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

    Udemy Javascript course

    Posted: 11 Feb 2021 04:13 PM PST

    I need recommendations on which course to purchase on Udemy to learn Javascript.

    https://www.udemy.com/course/understand-javascript/ (Anthony Alicea)

    https://www.udemy.com/course/the-complete-javascript-course/ (Jonas Schmedtmann)

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

    No comments:

    Post a Comment