Customize your cookie preferences

We respect your right to privacy. You can choose not to allow some types of cookies. Your cookie preferences will apply across our website.

We use cookies on our site to enhance your user experience, provide personalized content, and analyze our traffic.

[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]
4chanarchives logo

hey /g/, is this good enough for a first project or am I doomed to fail? https:/


Thread replies: 15
Thread images: 1

File: dot.jpg (43KB, 600x366px) Image search: [Google] [Yandex] [Bing]
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 replies: 15
Thread images: 1
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y / ] [Home]

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.
If a post contains personal/copyrighted/illegal content you can contact me at imagescucc@gmail.com with that post and thread number and it will be removed as soon as possible.
If a post contains illegal content, please click on its [Report] button and follow the instructions.
This is a 4chan archive - all of the content originated from them. If you need information for a Poster - you need to contact them.
This website shows only archived content and is not affiliated with 4chan in any way.
If you like this website please support us by donating with Bitcoin at 1XVgDnu36zCj97gLdeSwHMdiJaBkqhtMK