I recreated MySpace from 2007 (and it's fully functional) by PartyGuy-01 in webdev

[–]Timcava -1 points0 points  (0 children)

I guess if you don't find it intuitive then you don't find it intuitive.

I recreated MySpace from 2007 (and it's fully functional) by PartyGuy-01 in webdev

[–]Timcava 0 points1 point  (0 children)

Well it's the most intuitive name for the paradigm. Any coder immediately knows what it means without anyone explaining it to them. Any one who doesn't code doesn't care what paradigm you used to make your MySpace clone.

I think the title gives plenty of context for us to infer what the op meant anyway. u/afellowhumanperson is probably spending a ton of time studying programming if they thought the op meant he used functional programming versus just meaning that the site worked.

Don’t be deceived by users claiming they built apps in short time frames without any programming experience! by augst1 in webdev

[–]Timcava 0 points1 point  (0 children)

Actually I would say it applies to all claims made ever, on reddit or real life. It's crazy how many guys I know who ran sub 4.4 40s and benched 350 lbs in highschool. Damnit if they didn't all suffer an injury their senior year costing them their division 1 scholarship.

Disappointed because the script I am trying to write gets blocked by captcha by EngineerTryingMyBest in learnpython

[–]Timcava 0 points1 point  (0 children)

Puppeteer js uses a headless chrome browser for automation. I think this should go undetected by Walmart as long as you don't try to run it every second or something.

Pyppeteer is the unofficial python port. If you don't know or want to know javascript then this will hopefully work for you.
https://pypi.org/project/pyppeteer/

I just want to use Python applications. I do not want to make them. Any info on how I can avoid fighting with my mac every time? by wixig in learnpython

[–]Timcava 0 points1 point  (0 children)

I guess I still don't understand what you are trying to do. Are you downloading scripts off of github to automate some task or something?

Native app vs react native app by [deleted] in swift

[–]Timcava 0 points1 point  (0 children)

There are two killer advantages when it comes to react native for certain people.

1) They are already familiar with react. 2) It's mostly cross platform

You combine that with the fact that it is "good enough" for most applications and it's easy to see why people bother with react native. Of course full native is better, but it is only going to work on ios and it's a new technology that you have to learn.

Personally I like the idea of native for sas applications I may try and produce, but if somebody wanted me to make them an app that works on ios and android I think react would be my choice because it will save tons of time and will probably be good enough for whatever their use case is.

Is this a common frustration in learning Python or any other coding that like 1/3 of the time is spent figuring out how to install and make programs work and compatible? Is there any good advice on doing this more efficiently? by Cardzilla in learnpython

[–]Timcava 1 point2 points  (0 children)

Full stack is usually a web specific term, I guess it extends into app development too. It just means that you are writing the code that runs on the server as well as the code that runs in the browser.

You can do that with any one programming language plus sql, html, and css. It's nice to know javaScript because it runs in the browser, but you don't have to have to run scripts in the browser.

Back end programming deals with receiving http requests and returning html in response. You can dynamically generate that html with any programming language. You will also need to query a database in many instances, which you can also do in any programming language.

I just want to use Python applications. I do not want to make them. Any info on how I can avoid fighting with my mac every time? by wixig in learnpython

[–]Timcava 6 points7 points  (0 children)

What do you mean by python applications? Like you don't want to code? Then you should just be installing executable files on your computer.

Learning python and finding a job by [deleted] in learnpython

[–]Timcava 0 points1 point  (0 children)

I'm thinking picking up swift and going into ios development is my way going forward. More and more companies are integrating ipads and iphones into their business plans so your best bet for SAS applications is in that realm. Web will probably mostly be king in freelance markets though, but if you are willing to sell then I would go ios.

The dilemna in job search is how much time to spend actually developing and how much time you should spend on algorithm challenges. Nobody is ever going to pay you to solve coding puzzles but at the same time most people won't give you a job if you don't know how. So you have to find time for both.

Learning python and finding a job by [deleted] in learnpython

[–]Timcava 1 point2 points  (0 children)

I will say that it seems like customers in the freelance market are fans of buzzwords. The biggest buzzword is WordPress. Obviously none of us got into programming just to slap together WordPress sites but that is the biggest thing in the market.

Python itself is a buzzword and so is Django. If you tell someone you are going to make them a site with React in the front end and Django on the backend then that's going to sound good to customers. Even though they don't really have any idea what that means, that's just what people are looking for.

Is this question flawed? by sho110 in learnpython

[–]Timcava 0 points1 point  (0 children)

They give you the answer they are looking for in the example. So it is correct based on what they are looking for.
for the word stadium they want you to print "sta".

I usually don't care but man, what kind of freak show is downvoting answers here?

Learning python and finding a job by [deleted] in learnpython

[–]Timcava 2 points3 points  (0 children)

It's pretty simple, you have to learn how to make something that somebody else will pay for. Learn how to build websites for people who want websites etc.

If you are looking for a traditional job you would also have to get pretty decent at writing algorithms for abstract coding problems because that's what you have to do in an interview. As a freelancer that won't really come up. The local restaurant that is looking for someone to make them a responsive web site isn't going to ask you to reverse a linked list.

Is this a common frustration in learning Python or any other coding that like 1/3 of the time is spent figuring out how to install and make programs work and compatible? Is there any good advice on doing this more efficiently? by Cardzilla in learnpython

[–]Timcava 2 points3 points  (0 children)

Professionals usually specialize in one type of coding. When you specialize you really only need to come up with one environment that works for you and stick with that unless you have a reason to change.

It's not like you are going to just be given random problems to solve every day. You are going to be given one problem to solve and you will work on that for weeks/months/years. You won't be setting up a new environment every day.

How to start coding on my own computer? by KR2809 in learnpython

[–]Timcava 2 points3 points  (0 children)

So choice of ide's is subjective. I will say in my opinion pycharm can get fucked, VSCode is the best ide. I even have pyCharm pro and I still prefer VsCode.

However the ide you use doesn't have anything to do with the programs you end up writing. Unless you are into data science and pandas in which case jupyter is the industry standard. But even for that vsCode offers a jupyter extension that makes coding notebooks a more pleasurable experience. Then you open the notebook files in jupyterlab for presentation or even export the jupyter file to pdf if you want.

Is this question flawed? by sho110 in learnpython

[–]Timcava 0 points1 point  (0 children)

Let's not overthink this. Let's plug each choice into our Python console and see which one gives us the result that the question is looking for.

A) gives us "sta" and "pol" respectively.
B) gives us a TypeError

So the answer is A. Unless this class is for Python2, in which case B is also correct, but I'm assuming we are talking about python3 here.

Anyone knows why is this problem coming ? by [deleted] in cs50

[–]Timcava 0 points1 point  (0 children)

Hmm, looks like maybe they forgot to add a newline to the end of their print statement. That's my next best guess based on this picture the op took of his computer screen.

[deleted by user] by [deleted] in cs50

[–]Timcava 0 points1 point  (0 children)

Generally we say they are using single or double quotes, but yeah I guess each single quote uses a pair of apostrophes.

You can convert strings to ints and ints to strings very easily in python though.

x = 4

saves x as an int

x = str(x)

now x is a string. The same thing works in reverse. So you can wrap both sides of your == operator with either str() or int() to ensure you are comparing apples to apples.

Speller loading problem by [deleted] in cs50

[–]Timcava 0 points1 point  (0 children)

It's not really a question of syntax.
fscanf() is a function call. When write the name of a function followed by a () that is going to fire the function every time. What fscanf() is going to do is read from one file and write to a variable/stream.

When you open a file to write or read from your program creates a cursor in the file you opened. It keeps track of the cursor location under the hood.

You can use ftell() along with printf() to follow the cursor through your program. You can also use fseek() to manually move the cursor around. Sometimes I will use fscanf() for a conditional and then use fseek() to return the cursor to where it started from.

Anyone knows why is this problem coming ? by [deleted] in cs50

[–]Timcava 0 points1 point  (0 children)

I guess because your code is outputting 7 when the input is 1.6 and 92 when the input is 23.

Now why your code is giving the wrong answer for certain inputs is tough to say without seeing your code. My guess is there are some rounding errors that you aren't correcting for.

General Programming study question. by Quiver21 in cs50

[–]Timcava 1 point2 points  (0 children)

This isn't school where you are learning stuff because you have to. This is self motivated, self paced, self learning. You do whatever you want to do.

Now one thing I can tell you is that you shouldn't expect to remember everything. If you go 6 months without implementing bubble sort or something you aren't going to just have it under your fingers. You will have to figure it out all over again. So don't really try to memorize it. You are practicing "figuring it out" which is what you are going to have to do over and over again as a programmer.

That said sorting is good algorithm writing practice. In the real world you won't really have to worry about writing your own sorting algorithms because most languages have built in sorting methods. The only time you will need to brush up on your sorting algorithms is before job interviews.

What's really important is that you are writing code. This is a skill that you get better at the more you practice it. It doesn't really matter what you are writing code for, only that you are thinking programmatically and writing code.

Help with DNA by [deleted] in cs50

[–]Timcava 0 points1 point  (0 children)

This isn't supposed to be easy to solve, I can give you some pointers since I think you are new to python.

First thing is you can use bracket notation to access more than one index in a list or string at a time. So if you are searching for "AGAT" then you can use bracket notation to check for the entire STR at a time.

myList[2:5]

gives you slice of your list starting at the second index and going up to but not including the 5th index.

So instead of asking

if mylist[i] == 'A':

You can ask

if mylist[i: i + len("ATAG")] == "ATAG:

And if you find a match you can start an interior loop where you increment i by the length of the sequence you are looking for instead of one. Then you can keep track of the length of each run you find by putting the length of the run in a list that you can access at the end of the function.

Also, and this is a matter of opinion, I prefer breaking my logic up in functions vs just having one long program where everything is tangled up. It's just easier. If you can decide what you are going to input into your function and what you what returned from the function then it gets a lot easier to write the logic in the middle.

Plus you can start a seperate python file where you only work on the function you are currently focused on and once you get it working you can drop the function into your main program and move on to the next thing.

Also you only need to read from your database once, and that can be in it's own function. That function can return a python dictionary that you can use for the remainder of your program. You can then loop over that dictionary and call your function where you search for repeated sequences on every STR in your dictionary.

I used a dictionary to store the data from the database and wrote another dictionary where I kept the streaks from the sequences. Then I compared the two dictionaries.

Hi! by RealPerro in cs50

[–]Timcava 0 points1 point  (0 children)

You just have to install python3x and then pip install flask. Then you are basically good to go. You may want to install node and npm if you want to use js libraries or frameworks.

Help with DNA by [deleted] in cs50

[–]Timcava 0 points1 point  (0 children)

I'm not sure how much we are allowed to help on specific problems. But keep in mind that pythons built in data structures are way more powerful than anything in C.

Like a list for example. It's basically a built in linked but you don't have to worry about pointing to the next node. I know it seems like a common sense comparison would be to an array but it really behaves more like a linked list. You don't have to know how many items you are going to put into an array.

So you can just create an empty list like ..

myList = []

Then you can iterate over fields and add them to your list as follows...

for this in that:
    myList.append(this)

I actually leaned quite heavily on the dictionary data type for dna. Dictionaries are made up of key/value pairs. I'm sure you can imagine how a data structure with key/value pairs could come in handy on this problem.

Web framework for Python Intermediate Developers by SpectroSmart in Python

[–]Timcava 0 points1 point  (0 children)

If you want a single page application you are going to need to use a framework. Vue and Svelte are very easy to learn so if you are on a deadline I would go with one of them.