• Breaking News

    Tuesday, December 22, 2020

    Today I reversed a Linked List without looking anything up learn programming

    Today I reversed a Linked List without looking anything up learn programming


    Today I reversed a Linked List without looking anything up

    Posted: 21 Dec 2020 09:22 AM PST

    I don't have anyone to talk with about programming so I decided to post here. I hope this isn't too cringe

    It's not that much of an accomplishment but I generally find myself having to look up at least hints and sometimes full solutions for these types of problems.

    This time I did not look anything up until I had implemented successful code.... And my code was pretty much the same as the solutions I'm seeing.

    Idk if something is finally clicking in my brain or not, but it feels good. Now time to do this with recursion...

    Edit: Thank you all so much for the encouragement and awards!! 💛

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

    Today I finished my first ever project!

    Posted: 21 Dec 2020 07:42 PM PST

    I know this is not a big deal for the vast majority of you, but I am just so proud of myself for sticking to it, and doing what it took to finish my first project! It's a java program that allows you to convert and image into ascii characters. I actually got the idea from one of the links here in this sub!

    For everyone else who's a beginner working on their first project, keep at it! Not only is the end incredibly satisfying, but I have learned an insane amount of knowledge that I didn't even know existed by doing this project.

    Edit: https://github.com/stonezarcon1/ASCII-Conververter-in-Java/commit/12df434a7f3f37e7b6afcb18316696e0b1a25ba9 Here's the link to the code! It could use my more work when it comes to refining the image. Possibly by being more precise with how we select the ASCII characters based on the tuple value.

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

    I created a Youtube channel where I solve problems with code by building simple games with simple tools. In my latest project, I'm building the game Chess from scratch with HTML, CSS, and JavaScript.

    Posted: 21 Dec 2020 10:33 PM PST

    These projects, called "MillerBites", are meant to showcase how I approach problems, break those problems up into digestible pieces, and turn those pieces into serviceable (and hopefully sometimes elegant) code.

    I chose the tools that would allow me to focus more on what I deem important for the videos (problem solving) and less on the "fluff" (explaining the various idiosyncrasies of complex frameworks, for example). With that in mind, here are the technologies I use in these "MillerBites":

    • VSCode with LiveServer extension
    • HTML5
    • CSS with Bootstrap 4
    • JavaScript with jQuery

    There are many resources that explain how to use these specific technologies better than my projects will. My hope is that my five years of experience as a professional full stack developer will allow me to pass on some of the "soft" skills that are perhaps more technology-agnostic. I love solving problems with code. If I'm lucky, that will come across in these videos. So let's paint some happy little for-loops together.

    Here's the playlist for my chess project:
    https://www.youtube.com/playlist?list=PLn2Kofyv6Vu7IVfXdCBE25td_H7okxJFv

    If you're sick of all the recent chess references clogging the airwaves: my first project is a word game, cloned from the New York Times Spelling Bee game.

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

    Finally used my newly learned JS + CSS knowledge at work and finally feel like I haven’t wasted the last 6 months learning web development.

    Posted: 21 Dec 2020 11:41 AM PST

    I think like most aspiring developers, I've been absolutely struggling with confidence. It just seems like we're trying to climb the highest mountain and it can be incredibly daunting.

    I'm 6 months into the Odin Project and have really been enjoying it. It's challenging as hell but rewarding to get through it.

    Despite feeling moderately comfortable with everything I've learned so far, I'm still feeling like the idea of me becoming a web dev is far fetched, at best.

    However last week, i was able to use what I've learned at work and in my personal life and it gave me a boost.

    First, i rebuilt a component on a clients website by manipulating the HTML and CSS to be what they wanted. It involved me reading someone else's code and updating it.

    Second, i saved my wife hours of work by automating the process of sending hundreds of customer emails with Google Scripts.

    Not really sure why I'm posting this, i guess because i figure you all will understand how much these small accomplishments mean to me. Feel like i haven't wasted the last 6 months entirely. I'm still struggling with that confidence piece but I'm channeling what i read somewhere. The quote was "The best developers are the most persistent ones." So I'm going to hopefully ride that mantra into a new career.

    Keep going!

    Cheers y'all and happy holidays!

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

    Wonderful Computer Science Book

    Posted: 21 Dec 2020 09:56 AM PST

    2.5 year application developer here - and I just wanted to mention a book that I used in college that is immensely helpful (in my opinion) in learning, and summarizing, some of the key aspects of various domains in computer science and problems encountered in them.

    Computer Networks by Andrew Tanenbaum and David Wetherall

    If you have questions about how computers communicate with each other, what a Web server's purpose is, what do routers and cable modems do, what the hell are HTTP requests, what is TCP/IP, how does DNS work, etc. I can't recommend this book enough, it's well written and clarifies many things from a high-level view. It is by no means comprehensive on every subject the book goes over, but it's a good starting point.

    Just wanted to share if anyone may be looking for a book to pick up.

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

    After learning HTML/CSS/JS and React, what next?

    Posted: 21 Dec 2020 09:35 PM PST

    I'm would like to target frontend development positions (not that interested in backend), and I'm wondering what my next steps should be to become hireable. Should I just focus on making more projects and applying for jobs, or should I practice Leetcode questions? Also what other technologies/languages/frameworks should I learn to be hireable for entry level frontend jobs?

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

    Is codecademy worth it?

    Posted: 21 Dec 2020 10:30 PM PST

    I already have some experience with python, flask and back end development but it's self taught and incomplete. I need something with examples and structures and some form of guidance to fully absorb the experience. Would the codecademy pro skill path for python, flask, sql and back end be worth it?

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

    New projects

    Posted: 21 Dec 2020 08:16 PM PST

    Could someone helps me with new projects? I like to programming but I don't have any idea of projects that I can do... If you know any site about it can send me too

    Thank you!

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

    I have an extremely low level question regarding pseudocode

    Posted: 22 Dec 2020 12:03 AM PST

    I want to use Case Of in which one of the choices ends the program, what statement will I use with that choice in pseudo code that ends the program?

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

    How do you practice programming?

    Posted: 21 Dec 2020 11:58 PM PST

    I find myself reading books on programming languages and their syntaxes. However, I rarely know what to program for myself. Whether it's for personal projects or for just practice, I feel stuck. What do you do to get better at programming and what advice do you have for those trying to practice?

    submitted by /u/Hash-lingingSlash3r
    [link] [comments]

    I can't solve DS/Algo problems even if I am working as developer.

    Posted: 21 Dec 2020 11:20 PM PST

    I have a CS Bachelor degree. Many DS/Alog concepts were taught in my college but most them were over my head at time & I found that difficult to understand at that time. So I started focusing on building more practical projects like Blog site, E-commerce site etc till I get to my final year which I really enjoyed. After that I got a job as web developer & it's been two years I am working as web dev using Python/Django. What I observed in two years that I never had to use any kind of Algorithm or DS to make things work.I don't think I am bad programmer. I likes to keep learning new things & always try to follow the best practices & coding convention to write my code.Still I don't think I can solve those DS/Algo problems on some popular sites like leetcode. Is this a problem? Whenever I think about this I feel guilty of not knowing these things.I think to progress in my career DS/Algo will play a major role.what should I do if I want learn this things from scratch? I know I have asked too many questions in single post but I need some help & guidance.Thanks....

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

    Im a trader and im looking to learn to code for bots

    Posted: 21 Dec 2020 11:06 PM PST

    where do i start? absolutely no experience. what should i learn and in what order. the internet is a bit overwhelming when it comes to programming and i was wondering if i could get some insight for my exact needs. thank you

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

    Feeling lost...

    Posted: 21 Dec 2020 01:21 PM PST

    So I started learning HTML, CSS, and JS a couple months ago and it's been going alright. I'm not very good at all yet but I at least know the basics. Still not too good with JS at all.

    So I thought once I learn these three then I should be all set to get a job in the field and that will be that. Well just now, I finally searched for jobs in the area and they almost all require a minimal of experience in JavaScript, html, css, Linux, C++, C, python, react, Node, SQL, oracle, Spring, dev ops, Apache, AWS, etc.

    And all of these are just the minimum. If I feel like a complete noob after two months of just one of those things, how tf long will it take to learn all of them? My entire life?

    I'm also going to school full time and will have a bachelors degree in computer science in two years. I guess I was also kinda hoping to find some kind of part time job or freelance (if that's even a thing anymore) in the meantime and that's why I'm trying to learn web dev on my own. But I keep hitting a roadblock of feeling like it's not even worth my time. I'm just so lost and confused...

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

    Udemy: Java (Buchalka) vs C# (Panjuta)

    Posted: 21 Dec 2020 10:57 PM PST

    Hello,

    I'm having a bit of a dilemma. I've been wanting to learn either C# or Java. Both interest me equally much. Both have nice IDE's available (VS & Intellij), both are suited for what I want to learn as my end result (Monogame, ASP / Spring, LibGDX) and both have beautiful syntax.

    The thing is, I'd like to buy a Udemy course, but I'm not sure which one to go for.

    Tim Buchalka's course is 80 hours, covers A TON of info and I love his teaching style. But is 80 hours too much? Does it go beyond the point of what I want to/need to learn? Or does it ensure to give me a solid basis to work from? Plus the fact there's some awesome books and tutorials available.

    Denis Panjuta's course on the other hand, is 34 hours long and contains practical assignments which appeal to me as they are challenging, but the fact that it's so much shorter makes me a bit afraid that he might be skipping/lacking important things I might like to know down the line. I know I can look them up later, but learning them in the same context makes it "click" with me more

    Time or salary is not really an issue, as I'll be picking this up as a long term hobby, but what would you recommend to someone who already has a novice foundation in JavaScript and PHP?

    Buchalka: https://www.udemy.com/course/java-the-complete-java-developer-course/ Panjuta: https://www.udemy.com/course/complete-csharp-masterclass/

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

    I'm stuck, What to do next? Need some insight

    Posted: 21 Dec 2020 10:43 PM PST

    For background purposes, I'm self taught front end web dev. I basically learned from the job and very thankful for the company on letting me grow there. Now my problem lies here. To get in the details, what we do is basically, use wordpress and work on templates(created by our devs) to change the look of the website depending on what the client wants. Sometimes it changes a lot that you wouldnt even notice the template. I would say im intermediate when it comes to html and css(can use flex and grid proficiently). I started learning Javascript and Jquery that im able to read and create some simple scripts. But i feel like if ever i leave this company i dont really know that much aside from working on a template that was already created by our dev. Where do i even start? what else do i need to know/learn in order for me to let say take a freelance job? where do i start? i can basically work and continue someone's job/website but doesnt really know how to start from scratch. Can anyone guide me or any advise on what the correct way to go from here.

    Thank you in advance.

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

    On the topic of online text editors.

    Posted: 21 Dec 2020 06:46 PM PST

    I am trying to learn HTML and I would like some advice on good online text editors to use because I am using a computer from my non-programming school and I can't download anything.

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

    Question... Why does it feel like there isn't a language that had graphics and GUI in mind from the start?

    Posted: 21 Dec 2020 10:22 PM PST

    I mean, there's Javascript, that was originally meant for the web, but even JS assumes you've got a terminal, everyone's HelloWorld.JS uses console.log().

    No matter what language I've learned, every app I've made uses some secondary system for the interface. A webpage, a graphics library, XML with the interface...

    Is there any language that actually feels like logic and interface are part of the same thing, where you describe each element's form right before defining its function?

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

    Checkbox in react not working

    Posted: 21 Dec 2020 10:11 PM PST

    It seems to me that the checkboxes are deleted when selected, but the problem is the checkmarks are selected automatically for checkboxes that weren't deleted even if I never selected them. Why is this happening? This is referring to React.

    taskslists.jsx

    import React from "react";
    import {PriorityLists} from "../components/PriorityLists";
    import {Priority} from "./Actions";
    function ToDoList(props) {
    return (
    <PriorityLists \_onDelete = {props.\_onDelete} keys = {props.\_key} name = "toDoList">
    <Priority/>
    </PriorityLists>
    )
    }
    export default ToDoList;

    prioritylists.jsx

    import React, {useState, useEffect} from "react";
    import { Priority } from "./Actions";

    function PriorityLists(props) {

    function doSomething(e) {

    props._onDelete(e.target.attributes.getNamedItem("unique_Key").value)

    }
    return (
    <form >
    <div className = "input-group mb-3">
    <div className="input-group-prepend">
    <div className="input-group-text">
    <input unique\_Key = {props.keys} onClick={e=> doSomething(e) } id = "check-item" type="checkbox" aria-label="Checkbox for following text input"/>
    </div>
    </div>
    <textarea class="form-control" rows="1" name = {props.name}></textarea>
    {props.children}
    </div>
    </form>
    )
    }
    export {PriorityLists};

    tasks.jsx

    import React, {useState, useEffect} from "react";
    import {Delete, Refresh, Add} from "../components/Actions";
    import {Header} from "../components/Header";
    import ToDoList from "../components/TaskList"
    import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
    import {faPlus, faTrash} from '@fortawesome/free-solid-svg-icons'
    import {v4 as uuidv4} from 'uuid';

    function Task() {
    const [toDo, setToDo] = useState([]);
    const [idsToRefresh, setIdsToRefresh] = useState([]);
    const [list_of_Ids, setIds] = useState([]);
    const [filter_now, setFilterNow] = useState(false);
    const [userClicked, setUserClicked] = useState(false);
    function addToDos() {
    const id = uuidv4();
    setToDo(toDo.concat({_isKey: id, _checked: false, value:<ToDoList \_onDelete = {add\_Ids\_ToBe\_Deleted} \_key = {id} />}));
    setIdsToRefresh(idsToRefresh.concat(id));

    }
    function switchNow() {
    if(!filter_now) {
    setFilterNow(true);
    }
    else {
    setFilterNow(false);
    }
    }

    useEffect(() => {
    if(toDo[0] !== undefined) {
    list_of_Ids.forEach((item,index)=> {
    console.log(`List of Ids is ${item} and index is ${index}`);
    })

    setToDo(toDo.filter(item=> {
    return !list_of_Ids.includes(item._isKey);
    }))

    }

    }, [filter_now]);

    function add_Ids_ToBe_Deleted(_id_ToBe_Deleted) {
    setIds((item)=> [...item, _id_ToBe_Deleted]);
    console.log("The item being clicked is " + _id_ToBe_Deleted);
    }

    function refresh() {
    setToDo(toDo.filter(item=> {
    return !idsToRefresh.includes(item._isKey);
    }))
    }

    return (
    <div className = "main-content">
    <div className = "container-fluid">
    <div className = "row underline">
    <div className= "col">
    <div className = "row">
    <div className = "col-3 pt-2">
    <Refresh \_refresh = {refresh} />
    </div>
    <div className = "col-6 text-center">
    <Header header ={"Tasks"}/>
    </div>
    <div className = "col-3 pt-2">
    <button className = "float-right">
    <FontAwesomeIcon onClick = {switchNow} icon = {faTrash} size = "2x" />
    </button>
    </div>
    </div>
    </div>
    </div>
    <div className = "row">
    <div className = "col">
    {
    toDo.map(item=> {
    return (<div>
    <ul>
    <li>{item.value} {item._isKey}</li>

    </ul>
    </div>)
    })}

    </div>
    </div>

    <div className = "row">

    <div className = "col pr-4">
    <button onClick = {addToDos} className = "float-right" name = "add">
    <FontAwesomeIcon icon = {faPlus} size = "2x" />
    </button>
    </div>
    </div>

    </div>
    </div>

    )
    }
    export default Task;

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

    Can't figure out dynamic programming problems

    Posted: 21 Dec 2020 03:59 PM PST

    I'm a recent grad currently trying to strengthen my skills on solving DP problems, and even in school DP was always an achilles heel I could never overcome despite attempting dozens and dozens of example problems. I got a solid C in data structures because of it and I made up for it by being strong in other areas.

    With any DP problem there always seems to be some gimmick that once you figure out, the rest of the problem is laughably easy, but I can never get it in the short 20-40 minutes we have in an interview or test setting. For example, I just did this leetcode problem: https://leetcode.com/problems/word-break/

    Over 25 minutes the best I could come up with was this:

    class Solution { public: bool inDictionary(vector<string>& wordDict, string word) { for (string entry:wordDict) { if (entry == word) return true; } return false; } bool wordBreak(string s, vector<string>& wordDict) { string mainString = s; for (int i = s.length() - 1; i >=0 ; i--) { int sSize = mainString.length(); string substring = mainString.substr(i, sSize - i); if (inDictionary(wordDict, substring)) { mainString = s.substr(0,i); if (inDictionary(wordDict, mainString)) return true; } } if (mainString.length() == 0) return true; else return false; } }; 

    And this fails some edge cases like: "abbacdbe" [cdbe][be][acdbe][abba]

    The optimal DP solution was to keep an array of booleans where the ith value indicates whether a word was found or not, something like: https://leetcode.com/problems/word-break/discuss/43814/C%2B%2B-Dynamic-Programming-simple-and-fast-solution-(4ms)-with-optimization

    How do you come up with something like this on the spot? I've been asking myself this ever since my data structures class over a year ago, and I can't help wondering if I'm just too fucking stupid and can't think outside the box to get DP.

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

    Turning an optical mouse into a shitty fingerprint sensor - Overly ambitious or impossible project?

    Posted: 21 Dec 2020 09:55 PM PST

    Your optical mouse is basically a mini camera and likely works by continuous image correlation: that is, it compares the current image to the previous image to determine how far the mouse has moved.

    I was thinking, could this be utilised to use your mouse as a makeshift fingerprint sensor?

    From some research I came across this project to convert an optical mouse into a shitty camera, which unfortunately requires some soldering and work with the PCB: Optical mouse cam (+ Arduino)

    And then this stack overflow post, which does gets the same result WITHOUT the need for any electronics/pulling mouse apart: Acquiring images from mouse

    It seems that usually the image processing unit on these mouse chips is not readable, but someone with more knowledge may be able to do something here.

    Thoughts? Has anyone tried anything similar? Cheers all

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

    Data Structures in C

    Posted: 21 Dec 2020 09:10 PM PST

    Hi everyone,

    I'm wondering if you guys know any good resources for learning data structures in C, been struggling with that a bit.

    Thanks,

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

    Alternatives to Structure and Interpretation of Computer Programs

    Posted: 21 Dec 2020 09:05 PM PST

    Does anyone know of a book that discusses the same ideas as this classic book, but in a more general manner or ideally using a C-like language? I'll have no problem reading the Lisp, but I really want to reinforce my C++ skills using what the book is teaching. Thanks.

    submitted by /u/Ok-Echo3023
    [link] [comments]

    Help me with my tic tac toe game

    Posted: 21 Dec 2020 09:05 PM PST

    I am taking a C# course on udemy and the current challenge is to make a tic tac toe game and I really want to figure it out before watching the solution video. I feel like I am very close to finishing it but I'm at a loss currently on how to continue. I have the board drawn on the console and it will take input from the player and redraw the board with the corresponding space filled with an X.

    Now I need to figure out how to make it switch players after each turn, and I need to figure out how to make the game loop end when either player gets 3 in a row or by runs out of spaces left to fill. I also want to implement a game over state with a replay option. Could anybody give me some hints on what to do next? Also some feedback on the quality of my code and tips on how to make it cleaner would be great.

    Here is my code so far:

    using System;

    namespace TicTacToe

    {

    class Program

    {

    static void Main(string[] args)

    {

    string currentPlayer = "Player 1";

    string playerMarker = "X";

    string input = null;

    int outNum = 0;

    bool inputNum = false;

    bool gridOpen = true; //placeholder- meant to determine if a space is already taken

    string[,] grid =

    {

    {"1","2","3" },

    {"4","5","6" },

    {"7","8","9" }

    };

    while (GameLoop())

    {

    Console.Clear();

    DrawBoard(grid);

    Console.WriteLine("{0} please choose a space.", currentPlayer);

    input = Console.ReadLine();

    PlayerInput(grid, playerMarker, input, outNum, inputNum, gridOpen);

    }

    Console.WriteLine("Game Over"); // unreachable because GameLoop() is always true

    Console.Read();

    }

    private static bool GameLoop() // place holder because I dont know what to do here

    {

    if (true)

    {

    return true;

    }

    else

    {

    return false;

    }

    }

    private static void DrawBoard(string[,] grid)

    {

    int line = 0;

    do

    {

    if (line == 2 || line == 5)

    {

    Console.WriteLine("___" + "|" + "___" + "|" + "___");

    }

    else if (line == 1)

    {

    Console.WriteLine(" {0} " + "|" + " {1} " + "|" + " {2} ", grid[0, 0], grid[0, 1], grid[0, 2]);

    }

    else if (line == 4)

    {

    Console.WriteLine(" {0} " + "|" + " {1} " + "|" + " {2} ", grid[1, 0], grid[1, 1], grid[1, 2]);

    }

    else if (line == 7)

    {

    Console.WriteLine(" {0} " + "|" + " {1} " + "|" + " {2} ", grid[2, 0], grid[2, 1], grid[2, 2]);

    }

    else

    {

    Console.WriteLine(" " + "|" + " " + "|" + " ");

    }

    line++;

    } while (line < 9);

    }

    public static string PlayerInput(string[,] grid, string playerMarker, string input, int outNum, bool inputNum, bool gridOpen)

    {

    if (input != null)

    {

    inputNum = int.TryParse(input, out outNum);

    if (inputNum)

    {

    switch (outNum)

    {

    case 1:

    {

    if (gridOpen)

    {

    return grid[0, 0] = playerMarker;

    }

    }

    break;

    case 2:

    {

    if (gridOpen)

    {

    return grid[0, 1] = playerMarker;

    }

    }

    break;

    case 3:

    {

    if (gridOpen)

    {

    return grid[0, 2] = playerMarker;

    }

    }

    break;

    case 4:

    {

    if (gridOpen)

    {

    return grid[1, 0] = playerMarker;

    }

    }

    break;

    case 5:

    {

    if (gridOpen)

    {

    return grid[1, 1] = playerMarker;

    }

    }

    break;

    case 6:

    {

    if (gridOpen)

    {

    return grid[1, 2] = playerMarker;

    }

    }

    break;

    case 7:

    {

    if (gridOpen)

    {

    return grid[2, 0] = playerMarker;

    }

    }

    break;

    case 8:

    {

    if (gridOpen)

    {

    return grid[2, 1] = playerMarker;

    }

    }

    break;

    case 9:

    {

    if (gridOpen)

    {

    return grid[2, 2] = playerMarker;

    }

    }

    break;

    default:

    return "Error";

    }

    }

    }

    return null;

    }

    }

    }

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

    Need some great project ideas using Java or Python

    Posted: 21 Dec 2020 08:56 PM PST

    I know this has been asked millions of times before but I just can't come up with a good idea. I need a project that can impress employers. My skill level is a beginner but I have worked on a big project before, in other words, I have seen the SDLC cycle of an app, from designing all the way to deploying the app and I was part of it too. Thanks

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

    No comments:

    Post a Comment