[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

hey /g/, is this good enough for a first project or am I doo

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 15
Thread images: 1

File: dot.jpg (43KB, 600x366px) Image search: [Google]
dot.jpg
43KB, 600x366px
hey /g/, is this good enough for a first project or am I doomed to fail? https://github.com/footvaalvica/simfin
>>
>>52531229
So basically a value that has history?
Seems easy enough, using json with python 3 is really easy and straightforward.
Some things that I think would be great for you to do OTOH:
-separate the different actions (add, remove etc.) to functions/methods
-add error handling with exceptions (what if someone inserts non-int values to the dialog of how much money one inserts/removes)
-remove possibility to go to negative funds, unless you implement a credit system of some sort.
-perhaps encapsulate your "bank" account as a class, so that you don't end up with a metric fuckton of variables. Also good practice for learning.
>>
>>52531532
thank you, will try to do that
>>
>>52531229
I wonder who started pic related's meme. OS X used to have payed upgrades, just like Windows, but now they are free, ever since like 5 years.
>>
>>52532051
Then probably this picture dates back to the day when OS X still had paid updates, windows fucked your shit up 12 times a day and linux updates introduced new features instead of fixing old bugs.
>>
>>52532083
But OS X never had payed 'updates', that's the point.
Every year or so, when there was a new release, or upgrade, you could buy the new OS. Just like people from Win 7 to Win 8.
>>
>>52532124
christ stop fucking sperging, its just a picture.

people never actually complained about windows updates until windows 10 came and currysoft started putting it's brown unwashed dick in everyone's plate.

oslo it's "paid"
>>
>>52532445
People always complained about updates.
Especially those "We're gonna restart your PC in 5 minutes to install updates" ones.

(always means for more than 5 years)
>>
>>52532445
It's not an update, it's an entirely new OS. Snow Leopard and Lion are two different versions, just like Windows 95 and Windows 98. People paid for Windows 98, right?

OSX is literally perfect in every way. You will NOT win this.
>>
make it so writeout function takes var and y as input, rather than having those be globally modified

also use 4 spaces not 8-length tabs
>>
>>52531229
It looks like the code fulfills its very basic requirements.

Suggestions:

"var", "x", and "y" are shitty, non-descriptive variable names. Rename them to something that's actually descriptive and clear, like "action" and "amount", or something that's indicative of what they actually are.

Why are you converting the values to int? Shouldn't they be a float rounded to 2 decimal places, if we're talking about currency?

Follow the stylistic conventions for Python. Indentation should be done with 4 spaces, not hard tabs.

Add exception handling for when someone inputs something other than the basic actions you have here, possibly re-promting them for input maybe?
>>
>>52533074
Because arguing with OSX users are useless. All you guys think about is having a dick up your butt. You don't have brain capacity to make reasoned and informed choices
>>
rats

i was thinking of using your code for my company, but you licensed it under the GPL!

foiled again
>>
>>52531229

open('simfin.json').read()
var = json.loads(open('simfin.json').read())
var = var["var"]
moneyaddrm = json.loads(open('simfin.json').read())
moneyaddrm = moneyaddrm["moneyaddrm"]
whenaddrm = json.loads(open('simfin.json').read())
whenaddrm = whenaddrm["whenaddrm"]


This is bad.
>>
>>52533649
>All you guys think about is having a dick up your butt. You don't have brain capacity to make reasoned and informed choices
Arguing with you is pointless because the only thing you do is ad hominem.
QED
Thread posts: 15
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.