• Breaking News

    Friday, August 14, 2020

    Stop searching for general purpose practice assignments and work on something you are passionate about learn programming

    Stop searching for general purpose practice assignments and work on something you are passionate about learn programming


    Stop searching for general purpose practice assignments and work on something you are passionate about

    Posted: 13 Aug 2020 08:38 PM PDT

    We all started with practice assignments and the common "tic tac toe" type of programs.

    I did too. It was alright, but after a while it became boring, and programming became boring as well.

    I recently had several personal project ideas that I believe could go viral.

    Working on those increased my passion and love for programming x100 times!!!

    Now, I don't know if those projects will succeed or not, but my everyday enthusiasm and mood is better than before following the belief that I have a path/purpose and I am creating something that may actually matter.

    And if my programs don't go viral - at least I will have a unique portfolio.

    So my advice to newbies - get away from the typical practice assignments and common projects. Look at your everyday life - Is there something you want to automate? Is there a simple paid tool you can easily create for free? Is there a free tool full of annoying ads or that has other limitations? etc.

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

    Out of School and immediately depressed!

    Posted: 13 Aug 2020 08:30 PM PDT

    I never knew life would be this difficult.

    Some brief information about me. I am from a developing country, Iraq, and currently I am 24 years-old, and also I am married with no kids.

    How I got into programming. When I was a teenager I used to play a game called GTA: San Andreas, the game had an online multiplayer mod called SAMP (San Andreas Multiplayer), people were able to script their own servers using a C like language called PAWN. And that was where my journey began. After finishing high school I decided that I want to study Computer Science, but I took this decision too quickly without even doing some local research on job availability.

    My college journey. My first year was quite good, there were better students than me, but I literally kicked ass in programming class, but that was due to students not even knowing how to operate a computer. The second year was a bit more difficult, but I still was the best one in programming. These two years I learnt the basics of C++ and implemented some data structures using C++, such as Stacks, Queues, Linked Lists, and Double Linked Lists. Now, my third year was better than my second, I learnt the C#.NET programming language and the Windows Forms API, I quite liked working with the Windows Forms API, and doing projects with it was enjoyable, after the year was over I did my internship locally in a govermental office, I built a windows application for them using the Windows Forms API that I grew to love, however, in production things were terrible, I had very bad code issues, hard coded some values that I shouldn't of, my database issues were endless, so the project I worked was axed, I was really DEPRESSED. My fourth year was TBH just a normal year, I did not learn anything new at all, only HTML & CSS which I already knew the basics of.

    For more than 7 years I have not decided whether I want to specialize in Web Development, Mobile Application Development or something else entirely! I always get stuck reading books, watching videos, doing the best MOOCs out there, and the cycle just repeats itself. I know the solution, yes, it is practice, and working on real projects! But I always and always get stuck somewhere. I think a lot about what project to work on, what idea would be successful, I research for days, and after I settle on an idea I try to create the UI for it, then research for weeks! Eventually I get tired and leave the project all together, my problem is lack of discipline and the solution is to be more productive, ironic right? I mean I know all of my problems and the solution to them, yet I keep repeating them!

    Living in a country such as Iraq is very difficult, I am currently dependant on my parents even though I am a grown up man and married, this makes me feel very bad, getting a job here in programming ranges from hard to very difficult, due to some very complex reasons, it is achievable though, I can still do it. One of my best choices is to work remotely for western companies or do freelance work, which I still can't do because I have no resume and no projects to show to potential employers.

    I have no idea what to do, what to persuit in order to build a successful career in programming. I thought of having a mentor would help, but none exist locally, and I can't hire one online, because, guess what, we don't even have credit cards which makes everything even much more difficult than they already are!

    Me posting this might seem immature, or maybe even stupid, because you might say it is my life and I am responsible for everything that happens in it. And I do take responsibility, I am not running away from my problems. I just need help. Serious help from everyone who is capable of giving me a hand and getting me out of the ditch I am currently in.

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

    Looking for a programming partner

    Posted: 13 Aug 2020 12:44 PM PDT

    I have been studying programing for quite some time now and even though I am still studying daily I would like to be able to implement the knowledge that I have so far to start building some projects. I would love to find someone here and work with them in order to build some projects.

    This is so far the extend of my programming related knowledge:

    • Html/Css

    • Javascript

    • SQL

    • Python

    • Ruby

    If you are interested in the idea of teaming up and building projects for our github and portofolio feel free to dm me!

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

    What was the first programming language you started using? And are you happy that you picked that language?

    Posted: 13 Aug 2020 03:11 PM PDT

    I've started learning python this year

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

    trying to trouble shoota partially initialized module problem [python]

    Posted: 14 Aug 2020 12:01 AM PDT

    So I have a file, command_factory.py that contains the methods and definitions for a CommandFactory object. It doesn't create such an object, just contains the material and information needed to do so.

    I then have interpreter.py which is basically my main. One of the major functions that the interpreter() performs is collect input from the user in the form of strings, and then pass each string to the commandFactory which will create the appropriate command type object.

    But when I run interpreter and try, as soon as the interpreter goes to pass a string to command factory, I get the following error:

    Exception has occurred: AttributeError

    partially initialized module 'command_factory' has no attribute 'CommandFactory' (most likely due to a circular import)

    File "G:\Documents\projects\Programming Projects\Python Projects\Rogue Trader Game\python src\interpreter.py", line 31, in interpreter

    action = command_factory.CommandFactory(command)

    File "G:\Documents\projects\Programming Projects\Python Projects\Rogue Trader Game\python src\interpreter.py", line 41, in <module> interpreter()

    File "G:\Documents\projects\Programming Projects\Python Projects\Rogue Trader Game\python src\movement_command.py", line 1, in <module>

    from interpreter import game_state_instance File "G:\Documents\projects\Programming Projects\Python Projects\Rogue Trader Game\python src\command_factory.py", line 3, in <module> import movement_command as move

    File "G:\Documents\projects\Programming Projects\Python Projects\Rogue Trader Game\python src\interpreter.py", line 6, in <module> import command_factory

    But I'm not seeing where I have a circular import. Could I get a second set of eyes please?

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

    So much to learn and there's only one me

    Posted: 13 Aug 2020 03:58 PM PDT

    Just wanna vent a little of how there's so much I want to do and I feel like doing it all at once. I started out making games and up until now I've had fun making and learning as I go. It can get gritty for me but it pays off when its done. But as the days go on the more I get distracted by other things.

    I've had machine learning on my list for a while now because I found the projects in this field to be the most interesting. Unfortunately I don't think I'm at the level when I can start diving into that field so I put it off for later. I also had Haskell on my list because I read how functional programming works differently compared to imperative programming. Right below Haskell, theres computer graphics where there are interesting tools that you can build (ex. raytracer, simulating fluids etc). Then up next I have vim + the shell which is new concept to me. My experience with shells, scripting, makefiles etc is very limited. I haven't even mentioned frontend/back technologies yet. The list gets larger as the weeks pass by and learning anything really in CS requires commitment and effort (well that can be said about most disciplines).

    This is all happening in my head while I'm still working through python and learning the language. I have yet to build stuff with numpy/ tkinter/ etc. Interesting how there's always another topic out there that will distract you from what you're learning now :/

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

    Linear Interpolation step with marching squares

    Posted: 13 Aug 2020 08:23 PM PDT

    I managed to get a working version of the 'marching squares' algorithm. However, I can't conceptually understand how to go about implementing the 'linear interpolation' step.

    Here is the relevant function: https://pastebin.com/jMturQ37

    I made some poorly drawn diagrams to help try to explain my question. https://imgur.com/a/i7aNOCf

    My question is: Normally I am using the underlying data (in my case 0.00 --> 1), I use that data to get the 'state' of each cell, and use that state to decide which case I'm going to draw.

    In the image example only the bottom right cell ended up being > 0.5, so only that corner was 'on'.

    The case for that image was just to draw a line between the 'right' point and the 'bottom' point.

    When you want to add interpolation to 'smooth out' the lines, how do you make use of that original data?

    I've seen formulas something to the effect of amount = (1 - dvalue) / (dvalue - cvalue). And using that 'amount' value for the lerp() function, but that makes sense to be only if I'm adjust the A, B, C, or D.

    Am I using interpolation to adjust the corners of the cell, and then still finding the midpoints to draw everything? Or am I somehow interpolating the midpoints, but keeping the corners of the cells fixed.

    Anything I try to implement ends up being crazy, and the googling I have found tends to lead to university lecture slides with a few formulas and no variable explanations.

    Sorry for the long question! Any help is appreciated.

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

    Bug in the digital clock.

    Posted: 13 Aug 2020 10:20 PM PDT

    My question is for those who write low level code. If I was to build a digital clock and the minutes kept on going up instead of resetting back to 00 after 59 seconds. Would this be an example of buffer overflow. Would the system eventually crash if it left alone maybe at 100th second. I am witnessing this situation on a newly purchased equipment which has a digital clock built into it. I have not tested running over a long period of time yet

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

    Detailed beginner's coding process walkthrough

    Posted: 13 Aug 2020 10:16 PM PDT

    I wrote a blog post detailing the entire process of completing a small web scraper (pulling card prices and updating a local csv) from the perspective of a new, inexperienced python coder.

    This includes:

    • Process behind actually getting the right lines of code
    • Process behind debugging the code
    • What I googled, what stackoverflow threads I read

    I hope that this helps newer programmers realise that being stuck is a very normal part of the coding process, and help people feel less overwhelmed or intimidated by the process.

    https://pinkpurplepineapples.wordpress.com/2020/08/09/the-coding-process/

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

    Github branch setup. What do I have and how do I change it to what I want?

    Posted: 13 Aug 2020 09:49 PM PDT

    I had a git repo with just a master branch. I added a feature branch. I merged some changes to master from feature and then realized I would really rather have a master->dev->feature setup.

    So from the feature branch I did this:

    git checkout master git branch dev git rebase dev feature-coordinatePlot 

    Now at this point I'm not sure what I've done. I'm having a hard time verifying. I want to stop messing with it and figure out what I have before I make a big mess.

    Here is what I get when I do git show-branch:

    ! [dev] fixed typo * [feature-coordinatePlot] fixed typo ! [master] fixed typo --- +*+ [dev] fixed typo 

    I'm not sure what this indicates. It seems like maybe I have Master->feature-dev. I thought when I did git rebase dev feature-coordinatePlot I was making dev the new base of feature-coordinate plot. But perhaps I've done the opposite. If this is the case, how would I change it? Could I set dev base to master then feature base to dev? And any idea if any of this will cause issues with pushing to Github?

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

    Programming learning struggle

    Posted: 13 Aug 2020 05:23 PM PDT

    I already have a decent sum of general IT knowledge and I feel I am quite late to the programming game in comparison to a lot of people as a young adult but I really want to learn.

    For about a year on and off I've jumped between python, C#, made some mini games on unity, created websites, but I can't seem to fully "get into" programming when I really want to. I think I pretty much have an understanding of the fundamentals of programming I just don't know how to progress. I have a huge list of programs I want to make and I want the skills of coding as I know it'll also be a great opportunity for a potential job in the future.

    Can anybody offer advice?

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

    new to html5

    Posted: 13 Aug 2020 08:42 PM PDT

    can i only use CLASS and not using ID? because from what ive read, class can identify more than one element, whereas ID only can do one. correct me if im wrong please

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

    Done with the basic, I don't know what to learn next?

    Posted: 14 Aug 2020 12:21 AM PDT

    I have a problem when learning a new programming language. Basically I have gone through variable type, condition, loop, classes, some of the algorithm like sorting, searching and, etc I don't know what to do next?
    Where to go next to build a mindset that are ready to build bigger application like a Website or GUI application? Do I need to learn data structures or design pattern or something like that? Or just learn to use a framework and move on with it?

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

    Algorithm websites

    Posted: 13 Aug 2020 08:23 PM PDT

    As someone who has 3 years experience as a developer in a large department of a company i have really immersed myself in software development and really enjoy it.

    I want to be the best programmer i can and am curious about some things.

    I am wondering if leetcode and algorithm coding sites will help me write better code in general, along with my day job maintaining and building actual applications. I have read algorithm books etc but i want to learn how to actually apply sophisticsted algos to write more efficient code.

    If you google it, many people say leetcode and hackerrank are complety useless but this seems wrong to me.

    Basically, will learning and applying algorithms and data structures help me become a more efficient programmer on top of the nornmal skills learned working in the field.

    Thanks

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

    Retention and conversion in SQL

    Posted: 14 Aug 2020 12:08 AM PDT

    I have the following tables:

    Table users:

    - user_id VARCHAR *primary key

    - registration_date DATE

    - last_active_date DATE

    - country VARCHAR

    - is_subscriber BOOLEAN

    Table activity:

    - activity_id VARCHAR *primary key

    - activity_date DATE

    - activity_name VARCHAR

    - user_id VARCHAR

    Table object_info:

    - object_id VARCHAR *primary key

    - object_name VARCHAR

    - object_cost FLOAT

    - is_discount BOOLEAN

    Table transactions:

    - transaction_id VARCHAR *primary key

    - transaction_date DATE

    - object_id VARCHAR *references object_information.objectt_id

    - user_id VARCHAR *references users.user_id

    I want to calculate a 7-day retention and 7-day conversion. A user is defined as retained if they visit the website, which creates an "activity". A user is defined as converted if they purchase at least one object.

    Therefore, I assume that I need to aggregate registrations into weekly cohorts and derive a cumulative rate for retention and conversion at day 7. Also, the registration day of a given cohort has a retention rate of 100%.

    My idea for retention (I don't know if it is correct):

    with cohort_items as (

    select

    date_trunc('day', U.activity_date)::date as cohort_day,

    id as user_id

    from users U

    order by 1, 2

    )

    WITH user_activities as (

    select

    A.user_id,

    DAY_DIFF(

    date_trunc('day', A.activity_date)::date,

    C.cohort_day

    ) as day_number

    from public.activity A

    left join cohort_items C ON A.user_id = C.user_id

    group by 1, 2

    )

    with cohort_size as (

    select cohort_day, count(1) as num_users

    from cohort_items

    group by 1

    order by 1

    ),

    with retention_table as (

    select

    C.cohort_day,

    A.day_number,

    count(1) as num_users

    from user_activities A

    left join cohort_items C ON A.user_id = C.user_id

    group by 1, 2

    )

    select

    B.cohort_day,

    S.num_users as total_users,

    B.day_number,

    B.num_users::float * 100 / S.num_users as percentage

    from retention_table B

    left join cohort_size S ON B.cohort_day = S.cohort_day

    where B.cohort_day IS NOT NULL

    order by 1, 3

    For conversion I was thinking of using something like:

    select count(distinct t.user_id) counter

    from transactions t inner join object_info o

    But then I don't know how to put the condition and get the rate.

    The desired result will be something like:

    +-----------------------------------+------------+---------------------------+

    | Cohort_week | Registration_count| 7-day retention rate

    +-----------------------------------+------------+--------+------------------+

    | 2020-06-22 | 3600 | 65% |

    +-----------------------------------+------------+---------------------------+

    | Cohort_week | Registration_count| 7-day conversion rate

    +-----------------------------------+------------+--------+------------------+

    | 2020-06-22 | 3600 | 12% |

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

    Is it anyway helpful to have experience as a math tutor on your resume as opposed to just working retail and other jobs in college?

    Posted: 13 Aug 2020 08:21 PM PDT

    I am a CS college student and I get offers all the time to be a mathematics tutor at schools and companies that offer tutoring services. I was a math tutor at a community college for a bit and ended up leaving to take another job. My question is should I go back to tutoring because it would look good on my resume for later on when I start applying for software positions or do you think they would even care?

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

    How old was everyone when they started learning to program?

    Posted: 13 Aug 2020 04:32 PM PDT

    I'm 24 and feel so old learning python for the first time. I know it is petty but I wish I did this a long time ago. Did anyone else have success learning later? I feel like everyone I know who has programming experience started when they were really young

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

    How can I build this desktop app I'm thinking about?

    Posted: 13 Aug 2020 11:49 PM PDT

    I want to create a pop-up text input mask that can be toggled on and off with the press of a button on desktop. Upon hitting enter when a text has been entered an API is called and the response is displayed below the input mask.

    See this example image:

    https://i.stack.imgur.com/nwMDS.png

    Sadly I have no idea where to start.

    From what I have gathered so far Electron (js) seems to be a good choice for this, but C# or C++ seems to be good as well.

    1. Is Electron a good choice for this and could anybody guide me to a tutorial / GitHub Project similar to what I've described? I'd rather not use C# as I feel like js might help me overall more when I eventually want to build a web app.
    2. As I'm already using python a lot I'd like to know if this desktop app might be just better build using Tkinter? But from what I have seen Tkinter apps look not like what I'm trying to archive.
    3. What should I use to build the backend? I'd built it with Django and host it on Heroku from what I have planned so far.
    submitted by /u/Electricvid
    [link] [comments]

    Text-based programming on an iPad, for 13-16-year-olds

    Posted: 13 Aug 2020 11:40 PM PDT

    Hosting a class in basic programming for 13-16-year-olds, and having some trouble finding a decent app for text-based programming. We are stuck on an iPad. Preferably python, but as long as it's accessible and not too complicated, the language is not that important. The app must be free, and with no paid accounts (preferably without having to register as well, but that's probably a bit of a stretch). Any suggestions?

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

    Doing a runner game here, How do i spawn another path followed by the current path?

    Posted: 13 Aug 2020 11:39 PM PDT

     public Transform leftTileStraight; public Transform leftTileCurve; private Vector3 leftCurveSpawn; private Vector3 NextLeftSpawn; IEnumerator spawnLeftTile() { yield return new WaitForSeconds(0.5f); Instantiate(leftTileStraight, NextLeftSpawn, Quaternion.identity); NextLeftSpawn.z += 20; if(nextTileSpawn.z > 60) { Instantiate(leftTileCurve, leftCurveSpawn, Quaternion.identity); NextLeftSpawn = leftCurveSpawn; leftCurveSpawn.z += 20; } StartCoroutine(spawnLeftTile()); } 

    The "leftCurveSpawn" spawns right at the beginning which is vector (0,0,0) instead of the continuation of "nextLeftSpawn". Thank you

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

    Please help. I’m stumped on freeCodeCamp JavaScript recursion challenge. Can someone explain like I’m 5 years old?

    Posted: 13 Aug 2020 11:30 PM PDT

    Write a recursive function, sum(arr, n), that returns the sum of the first n elements of an array arr.

    Function sum(arr, n) { // code goes here }

    I understand that it's basically recalling the function into itself, but I can't wrap my head around how to answer it.

    Like "multiply the first n elements of an array to create the product of those elements"... what does that even mean?

    I feel like I've been doing great up until this point and i can't find a way forward.

    PLEASE.

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

    What's wrong with this?

    Posted: 13 Aug 2020 11:20 PM PDT

    My addNode function seems to not be working. It only prints out "7->" when I run it.

    #include <iostream> using namespace std; class List{ private: struct node{ int data; node * next; }; node * headPtr; public: List(); List(int); void addNode(int); void removeNode(int); bool isEmpty(); void display(); void setData(int); int getData(); void setNext(node*); node* getNext(); }; int main(){ List list1; list1.addNode(7); list1.addNode(1); list1.addNode(1); list1.display(); } List::List(){ headPtr = nullptr; } List::List(int x){ node * newNode = new node; newNode->data = x; newNode->next = nullptr; headPtr = newNode; } void List::addNode(int x){ if(headPtr == nullptr){ node * newNode = new node; newNode->data = x; newNode->next = nullptr; headPtr = newNode; }else if(headPtr != nullptr){ node * newNode = new node; newNode->data = x; newNode = headPtr; headPtr = newNode; } } void List::removeNode(int x){ } bool List::isEmpty(){ return headPtr == nullptr; } void List::display(){ node * loopPtr = headPtr; while(loopPtr != nullptr){ cout << loopPtr->data << "->"; loopPtr = loopPtr->next; } } 
    submitted by /u/gtrman571
    [link] [comments]

    Is SpringBoot the best framework to start learning?

    Posted: 13 Aug 2020 11:09 PM PDT

    I'm working on in a startup with in a data role Python as the main language. I want to move to a dev role. I developed apps in Flask, but couldn't find much of web dev jobs in Python.

    I'm good at core Java. To get back on track in Java, what is the best way(reasonable time and solid framework) to build a profile in Java and land at a job?

    Since I don't have recent experience to show in Java, what is best way to learn backend design concepts?

    Do any of the big companies use Python for web development?

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

    Question: Need help visualizing stack-based vs register-based abi calling convention

    Posted: 13 Aug 2020 07:16 PM PDT

    I've been very interested in programming language development for a while now. And the go team recently released a proposal to switch from stack-based to register-based calling convention. I'm having trouble visualizing where all this happens and was hoping someone could ELI5 it and maybe use some psuedo or paraphrased assembly code to help me visualize how it's working under the hood?

    mentioned go proposal: https://go.googlesource.com/proposal/+/refs/changes/78/248178/1/design/40724-register-calling.md

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

    No comments:

    Post a Comment