• Breaking News

    Monday, February 1, 2021

    I am a programming dummy, having tried many times in the past to learn a variety of languages. My biggest issue being the slow theory first style all the books I found take. What I would love is a lesson that dissects different programs and explains using a working code. learn programming

    I am a programming dummy, having tried many times in the past to learn a variety of languages. My biggest issue being the slow theory first style all the books I found take. What I would love is a lesson that dissects different programs and explains using a working code. learn programming


    I am a programming dummy, having tried many times in the past to learn a variety of languages. My biggest issue being the slow theory first style all the books I found take. What I would love is a lesson that dissects different programs and explains using a working code.

    Posted: 31 Jan 2021 11:18 AM PST

    The type of programs I would like to dissect would be graphic interfaces, but a variety would be beneficial. Thanks for any suggestions you might have. Languages I've tried in the past are C++, Python, Java, JavaScript, and Lua. Any advice where I could find lessons or an instructor that take this approach over the theory first, hello world style?

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

    Getting the most out of Leetcode for job interviews

    Posted: 31 Jan 2021 01:38 PM PST

    Many people I've worked with in the past struggle to effectively use practice time when preparing for job interviews. I did a small write up a while back to help with time management when practicing. Note, this will only really help if you've already covered data structures and are at least somewhat familiar with a coding language! While not every coding interview will be like this, many are! It may be possible to get a job by just having a portfolio and such, however, more and more there are technical screens to pass which just require efficient practice time put in.

    My original post is here: https://hackmd.io/@hellovai/BJICgX1aL

    I'll stick around for a bit to answer any questions people might have!

    Text copied:

    Leetcode

    Goals

    Many people use LeetCode incorrectly. Here's our step-by-step guide to most effectively grind LeetCode.

    The most important thing to recognize is what you are practicing for. In general, the primary goal of most people on Leetcode is to practice technical interviews.

    What not to do

    • Look at a question, think you know the solution, move on.
    • Do 30 problems the day before your interview.
    • Not do any leetcode at all.

    LeetCode vs Real Interviews

    The commonalities between leetcode and real interviews are:

    • The types of problems
    • Your first solution doesn't have to be the best solution
    • Online/Phone interviews are very similar to the LeetCode environment.

    The differences are:

    • Real interviews are timed.
    • Real interviews don't provide any starter code.
    • Real interviews don't tell you the problem category.
    • Real interviews don't tell you how hard a problem is going in.
    • Real interviews don't have a "Test" button which has all the unit tests.
    • Real interviews require communicating how you got to your solution just as much as arriving at the solution.

    That's a lot of differences, so when you do commit to practicing for interviews you need to have mechanisms for getting holistic practice sessions that can closely simulate a real interview.

    What's the best language

    It doesn't matter. If you use any of these you should almost never have an issue: * C++ * Java * Python * Javascript

    [color=green] Pick the one you know best. However, actually know the language you use. As a general rule of thumb, before you use a language in interviews, go write a 1000+ line project in it.

    <details><summary>C++ Checklist</summary> // TODO

    • Standard Library
    • auto
    • shared_ptr, unique_ptr, vs raw pointer
    • const
    • Object Lifetime
      • Construstor vs Copy Constructor vs Move Constructor
      • Memory Leaks
    • Realize that C++ is a double edge sword. You'll either really show off your deep understanding or possibly make mistakes the interviewer considers very trival.

    </details>

    <details><summary>Java Checklist</summary> // TODO </details> <details><summary>Python Checklist</summary> // TODO </details> <details><summary>Javascript Checklist</summary> // TODO </details>

    Data Structure Review

    You won't gain much from Leetcode if you don't understand data structures.

    Have you implemented each of these data structures on your own without standard libraries?

    [color=red] If not, do that first! Its a much better use of your time than LeetCode. As a bonus, you can show off your knowledge on Github after you're done!

    Category Data Structures
    Linear Array<br/>Vector<br/>Linked List<br />Circular Buffer
    Restricted Linear Stack <br/>Queue <br/>Priority Queue
    Heirarchial Trie<br/>Binary Search Tree (BST)<br />Balanced BST<sup>+</sup>
    Containers Unordered Set<br/>Unordered Map (Dictionary)
    Group Name Pending Graphs<br />Heap

    <sup>+This is to implement Ordered Set and Ordered Map.</sup>

    For each data structure above, can you fill out this table without references? Some actions may not be applicable for certain data structures. Can you identify those?

    Insert <br>* Index<br>* Front<br>* Back Remove <br>* Index<br>* Front<br>* Back Access <br>* Index<br>* Front<br>* Back<br> Find By Value
    Array
    Vector
    Linked List
    Circular Buffer
    Stack
    Queue
    Priority Queue
    Trie
    Binary Search Tree (BST)
    Balanced BST
    Unordered Set
    Unordered Map
    Graph
    Heap

    Properties Tables (Y/N unless otherwise specified).

    Sorted? Indexable? Insert Order Preserved Memory Overhead (Big O)
    Array
    Vector
    Linked List
    Circular Buffer
    Stack
    Queue
    Priority Queue
    Trie
    Binary Search Tree (BST)
    Balanced BST
    Unordered Set
    Unordered Map
    Graph
    Heap

    General Routine

    [color=green] Practice every day, just two questions a day. One in the morning and one at night.

    Don't aim to get good at problem solving over a month, aim to get good over six months. In six months, you'll have done 360 questions!

    [color=green] Set a 40 minutes timer.

    If you don't solve a problem within the time limit, stop, look at the solution and try to fully understand the logic behind the implementation. Then try to implement the solution without looking at it.

    If you do solve the problem before the timer, ask yourself how you can improve that code? Organization? Runtime? Memory? If there's nothing left to improve, write a comment in your code describe why there's nothing left to improve. If there's still time left, pause the time and look at the solution and see what you can learn.

    [color=green] At least 2 sessions a week, practice without hitting the run button.

    Some companies don't have compilers available so you just have a text editor. If you have the luxary of having access to a whiteboard, practice on that.

    [color=green] Ask for help.

    If you see a solution you don't understand, ask someone else to help explain it to you. Conversely, explaining a solution is the same skillset you will need to explain your code in an interview so explaining solutions is important too.

    Breaking down a session.

    In this section we'll outline exactly how you should approach the 60 minute timer you've set for yourself.

    Time Section Goal
    0:00 2 min Understand the problem.
    0:02 1 min Write down the fuction signature.
    0:03 5 min Validate your understanding by throwing some test cases and seeing the result. During this process you may start to see some pattern.
    0:08 5 min Recommend a brute force solution orally. Can you write the psuedocode for it? If no solution use this time to quickly vocalize the thoughts you had from your test cases.
    0:13 5 - 17 mins For very easy questions, you should be able to implement the solution, express the runtime. Often in a real interview, for easy questions, the interviewer will then ask a second harder problem for which you can start from 0:00 again.
    0:30 5 mins Test your solution again the cases you came up with initially and fix any bugs
    0:35 4 mins Vocalize your undertanding of the solution. How could you make it better? Do you see optimizations? Are there any advesarial input cases? etc.
    0:39 1 min Congratulate yourself on a job well done and take a quick mental reset break
    0:40 20 mins Review the solution on leet code. Do you understand the solution? Is the O(runtime) different? What about O(memory)? Did they use different data structures? Did you miss some edge cases? Were there any key insight that you missed?

    Notice at the 40 minute mark of every session, you should ALWAYS stop solving the problem and review instead. That will help leetcode not feel like an endless task. After one hour you should be done for that session.

    If you find you aren't able to understand the solution, or after two weeks you don't see any improvements, you may need to add an additional segment where you implement the solution without looking any reference.

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

    Looking for someone that wants to learn

    Posted: 31 Jan 2021 07:08 PM PST

    Hey r/learnprogramming, I have been a lurker here for a while now and I have been learning computer science at college. I know how it feels to be completely lost when you want to start learning programming and know nowhere to start. Searching the web for so many questions you have and not receiving a single answer. I want to help one or maybe two of you that want to learn programming or that is currently learning and has questions regarding career paths, languages, etc.

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

    Where to find and share "amateur", "experimental", or "from scratch" codes for things like computer vision, speech synthesis, etc.?

    Posted: 31 Jan 2021 07:53 PM PST

    I've been trying with little success to find hobbyist-type, "screwing around with code" type projects of people approaching problems like face detection, OCR, image analysis, etc. from people who don't re-implement established methods from literature (and may well even be ignorant of such methods, willfully or by chance), much less call a bunch of libraries or existing "black boxes", but fearlessly hack together something intuitive using math and just experimentation, with lots of array manipulation and cascades of if/then, etc., for the learning experience that you don't get taking something off the shelf that you don't really understand.

    I know that in a professional context it's often necessary in the interest of time to reinvent as few "wheels" as possible and re-use existing solutions, hence in a hobby context I have a need for an outlet for just using completely my own methods invented from scratch with no such pressure. They don't need to be perfect, or at the start even good, just interesting to build. It would be cool to find a community of people to share these with, and there must be other "crazy" people like me with the same impulse. However, in all my searching on Github it has been hard to find these sorts of projects. I am aware of ShaderToy and TurtleToy, which are kind of that kind of community for rendering methods, but I can't find similar things for other areas, even searching Github with stuff like "face detection from scratch", etc. Anyone know a good place to find and share these kind of "code experiments"?

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

    Am I falling behind?

    Posted: 31 Jan 2021 07:38 PM PST

    I'm a 2nd year CS student, going to a small university, and I'm a little slow when it comes to programming. I understand theory pretty well, but programming is where I need more time to think about.

    I recently did a Hackerrank quiz, to see where I'm at. The first question was something along the lines of "you have an array that has the order amounts, you have an integer as the maximum order size. What is the maximum amount of orders you can do". That question took me 60-70 minutes. I had 20 mins left for the 2nd question, it was about subarrays, and I had no idea where to start.

    Am I falling behind compared to others around me? Should I be worried or did you guys have a hard time when you were in my shoes?

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

    How to publish a very low cost website with a custom domain to AWS

    Posted: 01 Feb 2021 12:05 AM PST

    Hi everyone,

    I just published a video tutorial to YouTube that walks you through the steps to publish a website to AWS with a custom domain.

    A lot of companies use AWS (the company I work for does too) and I end up doing a lot of work with AWS during the course of building the projects I work on.

    In the video, we use an S3 bucket to store the files for our serverless website and register a custom domain with Route53. Then, we create an SSL/TLS certificate with Certificate Manager and configure CloudFront to make the website fast and secure.

    The video is based on: https://aws.amazon.com/getting-started/hands-on/host-static-website/

    From the AWS link above:

    Total cost of hosting your static website on AWS is dependent on your usage:
    Outside of AWS Free Tier Limits: typically $1-3/mo.
    Within AWS Free Tier Limits: typically $0.50/mo.

    The custom domain costs $12/year. If you are just learning, you do not have to buy a custom domain - just skip that part.

    If you teardown the website after you are done learning, it might cost a few pennies pro-rated?

    Hope this helps anyone wanting to get familiar with AWS.

    Here is the link to the video: https://youtu.be/1taAwLNiWPA

    submitted by /u/bink-lynch
    [link] [comments]

    To all the beginners, you just run into an error! What is your first action after you've read the error?

    Posted: 31 Jan 2021 08:03 PM PST

    I'm just curious

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

    Bare Minimum for Web Dev Jobs?

    Posted: 31 Jan 2021 11:41 PM PST

    Has anyone ever compiled a list of requirements to start applying for web development jobs?

    Been slowly working on switching my career to become a developer. Unfortunately I discovered programming some years after I graduated college through visual basic. I wish I'd had exposure before college as I loved it immediately and it's been a slow grind having a full time job and working on shifting my career path.

    Started as an actuary (boring) but these last 2 years I've been working as a data analyst which has allowed me to get my hands mildly wet with SQL and databases.

    I'm really eager to shift to a job where I'm learning and developing a skillset I feel passionate about during the workweek and not only on my free time.

    Been doing an online web dev bootcamp but I'd like to have a baseline on concepts I could test myself in or practice to be ready for a job in web dev and ready for the interviewing process.

    I'll probably document my experience and share it eventually. But any comments, tips, or ideas that could save me time or effort would be greatly appreciated!!!

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

    What was the first programming language you learned?

    Posted: 31 Jan 2021 08:25 PM PST

    What was the first programming language you learned?

    I started with C Programming

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

    I'm taking a bootcamp and about 4 months in I'm realizing I don't really know how to treat my computer as a work device. I need to know the ins and outs of backups, security, workfow and other elements of being a developer. Are there any good sources for this?

    Posted: 31 Jan 2021 02:05 PM PST

    I was admitted to a 6-month long bootcamp that has been amazing and I'm learning so much, but I'm realizing there's a lot of external stuff that I just don't get. I started using Linux about 3 months ago and LOVE it (it's very work-friendly and keeps me focused on working), but I don't understand it like I do Windows. Same goes for using Git, keeping my projects organized locally and on GitHub and just knowing about other popular services or platforms we have to use, even if they may not apply to me (common knowledge stuff).

    This also applies for looking at my computer as a means of income and not just a PC, like how do I keep my computer "safer" from physical and virtual problems, like power and security issues, keeping good backups, etc.?

    I really don't know what else to say cause the question is inherently vague. Any channels or websites about any or all of this stuff would be appreciated so much. :-)

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

    Reading files in C++

    Posted: 01 Feb 2021 12:27 AM PST

    I'm working on a project where I have to read the content of mp3 files, and I'm just really confused by something.

    Sometimes C++ appends some character to what I read. Basically when I just have a main function that reads (first 3 bytes of) the file and prints them, it's all good.

    When I call a function to do that it's all good as well.

    When I call a function in a function, that's when things get weird. Let's say the function reads the first 3 bytes and checks whether they are equal to something.

    I get different results whether I call that function in an if clause if (function()) ... or whether I save the results in a variable:

    auto result = function(); if (result) ...

    And if I put the code that actually opens the stream into yet another function results are different again.

    Sometimes the result is what I expect, sometimes some weird character is appended to what I read (it's not always the same). This sounds like there are some memory issues, but I never forgot to delete a pointer or free memory (if I don't use smart pointers). How do I debug something like this?

    Hope this was somewhat clear, I'm kind of confused by this, and I'm not sure how to explain it clearly, I hope you get what I mean.

    Thanks.

    (I'm using std::ifstream streams to read from the file btw. I don't know if this is relevant.)

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

    What would be the best language to use for comparing prices between two websites and then showing it on a website/private app

    Posted: 31 Jan 2021 09:44 PM PST

    So im trying to make a app/website for myself that would compare prices between Website A and Website B, i didnt really find any guides that would help with the coding part.

    I only found sites that were giving ideas on how to make a "good price comparison website" as in making a business out of comparing prices.

    it would have to update said prices realtime and possibly be able to add thousands of items from both sites automatically so u can just compare them by for example searching the item on my app, it would compare the prices on both sites if both sites have that item on sale.

    Im also quite new at coding so thats also one thing, ive only dabbled around with javascript/html/css.

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

    C# or Java?

    Posted: 31 Jan 2021 07:07 PM PST

    I'm currently going to college for a bachelors degree in software development, and I'm stuck between which programming language to learn. I want to focus on making software that will help others, I have no desire to work on any video games. Any suggestions?

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

    Python Absolute imports worked on my old machine, not working on new environment.

    Posted: 31 Jan 2021 09:39 PM PST

    Hi everyone, I am trying to import a local file but I am running into some trouble. this worked fine on my old machine but when I switched to the new one it stopped working for some reason.

    Here is my tree:

    .

    ├── folder1

    │ ├── file1.py

    │ └── __init__.py

    ├── folder2

    │ ├── file2.py

    │ └── __init__.py

    └── __init__.py

    While in file1.py I am trying to import file2 as f2. It is nott working. Can anyone help? What happened where it worked on my other machine but now it is broken?

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

    What are the facilities offered by DBMS?

    Posted: 31 Jan 2021 09:29 PM PST

    I am studying the types of users that use DBs and my book mentions the term "facilities" and unsure what it means by that.

    "A typical DBMS provides multiple facilities to access a database. Naive end-users need to learn very little about the facilities provided by the DBMS; they simply have to understand the user interfaces of the mobile apps or standard transactions designed and implemented for their use. Casual users learn only a few facilities that they may use repeatedly. Sophisticated users try to learn most of the DBMS facilities in order to achieve their complex requirements. Standalone users typically become very proficient in using a specific software package. "

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

    What things should I learn in HTML, CSS and JavaScript?

    Posted: 31 Jan 2021 09:12 PM PST

    I wanted to get started with Frontend development and I refered to Mozilla Web Docs. But the content it has about HTML,CSS and JavaScript, i found it quite intimidating to learn them all. Can i learn only selected topics from these topics or should I learn them all in order to build a clean and responsive website?

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

    Python: Need help with raising errors properly

    Posted: 01 Feb 2021 12:41 AM PST

    So, I have a created a class which takes a very specific input. Anything other than the specific format, it's supposed to throw an error. Right now, I'm handling the error through simple if statements in the __init__ definition of the class.

    The problem is, when I raise the error (TypeError), the traceback error message displays the source all the way back to the raise statement I'm using. I'd like it to only trace back to the statement where the user has called the class.

    This is what it displays at the moment:-

    Traceback (most recent call last): File "G:/trio/3d demo/main.py", line 3, in <module> print(matrix.matrix(1234)) File "G:\trio\3d demo\matrix.py", line 11, in __init__ raise TypeError("'list', 'tuple', or 'set' object expected") TypeError: 'list', 'tuple', or 'set' object expected 

    This is what I want it to display:-

    Traceback (most recent call last): File "G:/trio/3d demo/main.py", line 3, in <module> print(matrix.matrix(1234)) TypeError: 'list', 'tuple', or 'set' object expected 

    I've googled it, but the best thing that I found was python's official documentation about the traceback module. It has a few functions which look to be promising, but I believe I'm probably missing the "trick" regarding how to get it to do what I want.

    Also, I did find this question on SO, but no satisfactory solutions.

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

    Where can I learn to program?

    Posted: 31 Jan 2021 08:39 PM PST

    Hi guys! I want to learn Python and C++ basics. Do you guys have any suggestions on resources that can help me learn and what text editor to use??

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

    How to get data from an app?

    Posted: 31 Jan 2021 08:25 PM PST

    Hello! I'm sorry if this is the wrong sub to ask this, if it is please tell me:)

    I'm currently learning Python, 3.7 version in Idle and sometimes in VS Code. Unfortunately, I recently got stuck in a problem: I need to send data from an app to a webserver (I am using flask). I know this sounds really, really easy, but here are some maybe complications:

    1. I want a separate app, which a user will download onto their computer. Then that app will send information to a webserver, which contains multiple user info taken from each user's downloaded apps, and display them on a website.
    2. I think regular sockets mess with flask for some reason, and threading is being weird.
    3. I don't think I can use any json code as this will be purely python based (I think)

    So the question is: how should I carry out this communication? Which package should I use? What is a tutorial I can follow, some example code maybe?

    Thank you:)

    I will appreciate any reply!

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

    Python sets.

    Posted: 31 Jan 2021 08:23 PM PST

    Basically I'm new to coding and just started learning Python in a class. One problem asks me to take all data from 2 separate sets and create a third set with all of the data from both sets, without messing with the original 2 set's data.

    Edit: The sets are male_names and female_names each containing 10 names, some names are in both sets. I need to create a third set all_names which has all of the names from both sets, neutral_names which contains just the names from both sets, and specific_names which has all names which are not in both sets.

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

    Creating jar file

    Posted: 31 Jan 2021 08:09 PM PST

    I am trying to create a jar file in intellij. The problem is that to go with my game I have a collection of images/audio recordings. I have put all of these images in the project folder but not in the src folder. I have read that when creating a jar file intellij only uses what is in the src folder. Does anybody know how one can add images into the src folder? thanks

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

    Side Projects

    Posted: 31 Jan 2021 11:09 AM PST

    I'm doing computer science and software engineering in college and I'm in 2nd year now. Idk how I only found out about side projects but I heard somebody talking about them and they sound important so I guess I'm just wondering what is an example of a side project and am I screwed because I'm in my second year of college and I don't have any?

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

    Java/JavaScript to target specific application.

    Posted: 31 Jan 2021 11:35 PM PST

    Hello all; I'm making a video game automation which will / can conduct a series of predefined tasks. One of these is moving the Cursor to X and Y coordinates.

    I would love to run multiple clients of the game in other accounts at the same time but of course I cannot at this stage.

    What code can I use to make the code target a specific application only?

    Thank you;

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

    How do I create an e-commerce website from scratch?

    Posted: 31 Jan 2021 07:41 PM PST

    I don't want to use WordPress or Wix! I want total control of building this thing.

    I know this question has been asked a bunch, but all I'm finding for answers is WP and Wix. I am trying to build a nutrition website for a friend. She will have programs to sell on the site and a way for people to log into it to keep their information.

    Now, I am pretty set on the front end stuff for making the site look how it should. Where I run into trouble is what I need to do for the backend stuff for logging in and buying products. Also, she will need to be able to see who is buying what so she can send them certain things.

    Is there a good place to find all of this? What back end stuff do I need to figure out? Is there a good video where someone builds an entire e-commerce site from the ground up?

    Thank you for any help!

    p.s. r/webdev said my karma is too low to post with them :(

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

    No comments:

    Post a Comment