flat assembler
Message board for the users of flat assembler.

Index > Windows > Python

Author
Thread Post new topic Reply to topic
nmake



Joined: 13 Sep 2012
Posts: 193
nmake
I follow debates on different forums and I know this guy who wrote a python script to help another guy get rid of a popup window. So he made a python program to kill a window, the script was about 10-15 lines long.

He made an executable from the script and the size of it became almost 3 Megabytes. I had to laugh. But I didn't tell him, its ridiculous. Very Happy
Post 16 Dec 2012, 14:07
View user's profile Send private message Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 22:11; edited 2 times in total
Post 16 Dec 2012, 14:20
View user's profile Send private message Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 193
nmake
Many programming languages are object oriented, some/or many are 100% object oriented. The art of programming has been lost. Today's programming is about puzzling bricks and putting them nicely together to form shapes, like a lego puzzle, but all the bits and legos are already constructed for them, the technical things are taken care of. And so people today are losing grasp of what real programming is, or they never knew it to begin with. You have to face it, you're not a programmer if you are playing with lego bricks, at least not a technician. Chances are if you begin in any language, you have a huge library with all the default functions available to you, you never get to practice to write your own.
Post 16 Dec 2012, 14:27
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
nmake wrote:
He made an executable from the script and the size of it became almost 3 Megabytes. I had to laugh. But I didn't tell him, its ridiculous. Very Happy
Python is a dynamic language - those are relatively hard to compile into something efficient - so the typical compilation is including pretty much all of the runtime, the interpeter/JITer, and the (hopefully) AST version of the source code. This isn't very efficient size-wise, but it does do the trick, and in a lot of situations it doesn't really matter.

Where languages with a large runtime shine is when you can depend on the runtime being available at the target computers - you get rapid development, and usually a smaller binary than what you get C++, assembly or whatever - because you can leverage that existing runtime. Executable size is usually completely irrelevant for those targets, though, and the rapid development is what matters.

nmake wrote:
The art of programming has been lost. Today's programming is about puzzling bricks and putting them nicely together to form shapes, like a lego puzzle, but all the bits and legos are already constructed for them, the technical things are taken care of.
That might be true for the "cooking recipe" outsourcing jobs sent to India - but even when using a lot of premade libraries, there's still quite a bit of programming involved in modern programming. It's more about codifying business rules&requirements rather than algorithm implementations... but decent programmers still consider efficiency - it's been moved to algorithmic complexity rather than instruction-level optimization, though. Programming is about managing complexity - and the software systems of today are so darn big and complex that it just isn't feasible reinventing the wheel for every single project.

nmake wrote:
Chances are if you begin in any language, you have a huge library with all the default functions available to you, you never get to practice to write your own.
...which means you can focus on Getting Things Done(TM) instead Smile. Education-wise, anybody who gets into programming should spend some time on algorithms and data structures to have a clue about performance, and most (but not necessarily everybody) should have some machine architecture classes as well. When you hit The Real World(TM), you aren't going to be working at that level, though - but you use the knowledge you've absorbed to avoid writing shitty code. And if you're skilled (and lucky at getting a relevant job!), you can work on base libraries that are usable by other people.

That said, there's a lot of sloppy programmers around (I often cringe at code I see in The Real World) - but I guess that has more to do with computers being increasingly more commoditized rather than the languages involved.

_________________
Image - carpe noctem
Post 16 Dec 2012, 15:14
View user's profile Send private message Visit poster's website Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 193
nmake
If you ask a high level programmer or talk about some of the things I've mentioned, he will immediately begin to talk about "business". They always bring up that word, whatever happened to programming as a hobby or as something that is about speed, or working at the level of the computer is put behind in the shadows. If you talk sense to a high level guy, he will always respond by bringing up the two words, "business" or "money". Programming is irrelevant, and so if you can't talk about anything but money, why debate programming in the first place, either we are debating programming or we are debating economy, you have to choose fields. Smile

If economy is the field of interest, then let's switch topic to talk about gambling instead, its has a much higher probability of gaining fast money than programming does.

1. No, 100 bucks extra a week is not going to save critics for your badly implemented algorithm.

2. No, your tax bill is not going to save you from your lack of understanding of low level programming or how computers work (for that matter)

3. Your hospital bills is not going to outlaw your bad programming skills.

4. No, assembly is not a bad "language" just because you can make 10 dollars more a week.
etc.. Very Happy
Post 16 Dec 2012, 15:30
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
nmake wrote:
If you ask a high level programmer or talk about some of the things I've mentioned, he will immediately begin to talk about "business".
Sad(?) but true. But that's what it's like in the professional, rather than hobbyist, segment.

nmake wrote:
Programming is irrelevant, and so if you can't talk about anything but money, why debate programming in the first place, either we are debating programming or we are debating economy, you have to choose fields. Smile
That's a bit narrow-minded, IMHO. If you're only interested in hobby-programming, then you can of course choose to do whatever you want, spend as much time as you like gold-plating a single piece of code (and this is something I still enjoy Smile) - but if the context is "professional" (as in "I do this for a living", not necessarily "I'm pro at this!") you have to consider a lot more factors - money, time to market (*sigh* - it sucks, but it's what the coke-snorting management wants), interaction with clients, et cetera.

nmake wrote:
1. No, 100 bucks extra a week is not going to save critics for your badly implemented algorithm.
Nobody cares about "algorithms" - they care about "does it crash?", "does it produce wrong numbers?", "does it take too long?" - common people aren't like us, they don't really perceive a difference between 100ms and 3000ms to get some action done.

nmake wrote:
4. No, assembly is not a bad "language" just because you can make 10 dollars more a week.
etc.. Very Happy
If you're a good assembly programmer and you're able to score That Job(TM), you're going to be adding a lot more than $10/mo to your income compared to a run-of-the-mill Java/whatever developer. But if your assembly skills are limited to "writing tiny executables" (or you're just not good at selling yourself, or finding the right employer, or aren't at the right place in the world) - you're going to be earning less than some person who's moderately skilled with a higher-level language but can churn out code faster than you. (Most) businesses these days don't very optimized code, they need somebody who can understand their complex requirements and quickly convert it to some code that isn't too buggy. Sad but true.

There's a big difference between "professional" and hobby programming - and for "professional" programming there are big differences depending on what corner of the spectrum you're working at. And there's no one tool that fits the job... programming a CMS in assembly? Writing video codecs in C#? Doing a GUI in Python? Please, right tool for the job. A good developer is polyglot, and knows when to use what. A programmer lives in India, gets a list of requirements, mechanically transfers that to code, and earns a bowl of rice for a day's work.
Post 16 Dec 2012, 16:07
View user's profile Send private message Visit poster's website Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
[ Post removed by author. ]


Last edited by HaHaAnonymous on 28 Feb 2015, 22:11; edited 2 times in total
Post 16 Dec 2012, 16:37
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
Well. I do it because I love it. I found myself freelancing and I make pretty much good dough off it. But still, I prioritize the code more than what I'll earn from it Wink
Post 16 Dec 2012, 16:41
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
Well, we already have CMS in assembly - here and even here.
It was not so hard to be done actually. I think the mantra "right tool for the job" is one big marketing trick. Smile
Post 16 Dec 2012, 16:51
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
HaHaAnonymous wrote:
I just program as a hobby (serious hobby)! And it is enjoyable, very enjoyable!
Then do what you find enjoyable! If you're doing something as a hobby, you should do it because it brings joy joy. (If you're interested in programming in general, open your mind and study other things to broaden your horizon - but stick to doing things that bring you joy.)

HaHaAnonymous wrote:
And I was never interested in working for some company, to earn money or anything in this segment, I am free to learn, use or work on what I want, when I want.
+1. I ended up choosing programming as a job, since I didn't know what else to do - and I'd rather compromise on programming purity and do well-whatever stuff for a job than I'd work at a factory (so, I kinda work at a code factory instead ;P). This gives a lot of perspective, but also means I don't have a lot of energy for hobby programming - I'd rather go for a walk or read a book when I get home. I sometimes miss hobby programming and obsessing over details and optimizing code and doing Really Nice Stuff - but it's OK doing not-so-hot stuff (but doing it somewhat better than a lot of the other drones and thus making the world a tiny bit better Wink) as a job, and spending my free time doing other things.

Sometimes, I wonder if choosing my hobby as a professional career was a mistake - but I honestly don't know what else to do Razz

_________________
Image - carpe noctem
Post 16 Dec 2012, 16:54
View user's profile Send private message Visit poster's website Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 822
Location: Jakarta, Indonesia
TmX
JohnFound wrote:
Well, we already have CMS in assembly - here and even here.


Maybe it would nicer it if could be extended as web application framework...

Very Happy
Post 17 Dec 2012, 10:37
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
TmX wrote:
Maybe it would nicer it if could be extended as web application framework...
What "web application framework" actually means?
More features can be added easily to MiniMagAsm, but I simply don't need them right now.

_________________
Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9
Post 17 Dec 2012, 14:58
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 822
Location: Jakarta, Indonesia
TmX
JohnFound wrote:
TmX wrote:
Maybe it would nicer it if could be extended as web application framework...
What "web application framework" actually means?
More features can be added easily to MiniMagAsm, but I simply don't need them right now.


en.wikipedia.org/wiki/Web_application_framework

The simplest definition of framework is the basic parts of the project is generated for you. So you don't have to write everything from zero. Just fill the missing parts, or modify them to suit your need.

Web application framework means that common things like CRUD, caching, security, etc are provided for you. It's a very common practice nowadays to build apps using frameworks.

It's OK it you don't need them, and of course I'm not asking you to add such features, but sometimes it's kinda cool to imagine about a full web framework written in assembly.

Maybe it can serve as an interesting programming exercise Very Happy
Post 17 Dec 2012, 15:18
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
From what I read in wikipedia, MiniMagAsm even now can be classified as "ultralight web application framework". Razz As long as it is modular and template driven, you always can change the templates and css files in order to get completely different view and even different features.
Post 17 Dec 2012, 15:28
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
nmake



Joined: 13 Sep 2012
Posts: 193
nmake
I think that, the whole point of having a runtime is that you don't have to put the whole runtime into every program you make, the whole purpose of a runtime is to have it separately installed. Shipping each program with the entire runtime in the executable is probably the most backward idea I've ever heard of, it would be like ordering a ferrari from italy and then take out the tires, put bicycle tires on it and then drive the car around. Very Happy

Or it can be compared to buying a refrigerator, you open it up and turn the elements around so that it produces heat instead of cold and use it to heat up your apartment.

Maybe even something like, buying a set of nice new headphones and use the earcups as ashtray. (Perfectly designed for this)
Post 17 Dec 2012, 15:29
View user's profile Send private message Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
JohnFound wrote:
Well, we already have CMS in assembly - here and even here.
It was not so hard to be done actually. I think the mantra "right tool for the job" is one big marketing trick. Smile
From the documentation, it seems more like a lightweight templating engine than a CMS?

_________________
Image - carpe noctem
Post 17 Dec 2012, 16:30
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3502
Location: Bulgaria
JohnFound
f0dder wrote:
From the documentation, it seems more like a lightweight templating engine than a CMS?

What features should have some web application in order to be named by you "CMS"?
MiniMagAsm manages content - you can edit the pages online, using lightweight markup language. The pages are formatted automatically, You can sort the pages in different categories and subcategories and the navigation is automatically created. The table of contents for the articles is also automatically created. The users can post comments under the articles and it has even bot protection (that is surprisingly effective actually).

_________________
Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9
Post 17 Dec 2012, 17:42
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on YouTube, Twitter.

Website powered by rwasa.