6 ms·
I learned to program in Borland Turbo C++. One thing from back then that I really miss is how easy it was to do some complex things. I was able to draw to the s
by ecshafer 3y ago
I learned to program in Borland Turbo C++. One thing from back then that I really miss is how easy it was to do some complex things. I was able to draw to the screen by just calling geometric shape functions, and it made pictures! I found out that if I drew a shape, then called the xor function on the shape a new but sligtly different shape, I could make animations. So making little sprites that looked like they were running made out of only 1000 lines of C++ code was awesome. Some friends and I we got together and made a final fantasy like game using these tricks, hand crafted sprites and a game world that you could walk across, every map was a whole screen, and you would go to an adjacent map when you hit the sides, and every step if you had a natural 1 you would go into a fight with some enemies.
This was all pretty tedious and everything, but it was a lot of fun to high schoolers. And if we knew more computer science and software engineering we would have done more probably, and it would have worked better. But unlike today we didn't have to learn SFML or or activex or opengl to just start playing and get stuff working, we could just call circle.
- xyzelement 3y agoI suspect that if we wanted to find an environment for kids to do simple shape programming, we can find something like that. The difference seems to be that there's been a greater divergence between "professional" tools and "kids/intro tools" whereas Turbo C++ (or Turbo Pascal in my days) were kinda both.
- mikepurvis 3y agoI've been struggling with getting my ten-year-old across this gap. He's outgrown Scratch/Roblox and I don't think PICO-8 is quite the right set of abstractions (no built in entity system, seriously?); we're working with Godot right now and he's making progress, but it's definitely a lot more of a learning curve figuring out how to do stuff in a tool that has everything.
- xyzelement 3y agoI have a 3 and 1 year olds but starting to think about this. If we really think basic / turbo pascal has this right. Why don’t we just teach our kids those things. We can get the environments running I am sure.
- ecshafer 3y agoI think something like basic or pascal is right. The "hard" part I think that Borland did so well was make it so easy to just get things right. A Neo Turbo Pascal that you could could type draw(x,y,z,r,"red") and see a red circle on the screen is the ideal, without having to mess with a very complicated workflow like in unity or unreal.
- mikepurvis 3y agoI mean, PICO-8 is basically that: https://pico-8.fandom.com/wiki/Circ https://pico-8.fandom.com/wiki/Circ But I'm just not sure if pixel-by-pixel drawing is the right abstraction layer at this point in time.
- xyzelement 3y agothat looks cool to me, thanks for sharing. I think something that works well for kids is instant feedback on their code/tweaks, looks like this has it.
- mikepurvis 3y agoPICO-8 sits in an interesting spot where it's not exactly a "toy" language/environment the way Scratch is, nor is it especially geared at learning, but on the other side of things it is based on a real programming language (lua) and there's an interesting scene for it where people flex pushing it to its limits making demos, demakes, etc, many of which are far beyond the NES-level capabilities it's meant to have.
- fuzztester 3y agoPython's turtle graphics or Logo is good for this. Free Logos are available even today.
- khrbrt 3y agoWould processing[0] be a good fit? It's designed to be easy to use and learn but powerful enough for professional use. Very quick to get cool stuff moving on a screen and the syntax is Java with a streamlined editing environment. [0] https://processing.org/ https://processing.org/
- bombcar 3y agoThrow him off the deep end into Minecraft modding ;) If you search around there are some pretty decent "download InteliJ and go" things.
- philiplu 3y agoI’ve got a 15 yo who decided to start programming in Python using Pythonista on his iPhone. He refuses to take any input from me; just wants to learn on his own. Pythonista comes with some nice game-programming modules. So far he’s shown me a Pong game, 2048 clone, air hockey, and more.
- ecshafer 3y agoThere has been a lot of effort put into making kids versions of technology, which I think is probably the right move for elementary school aged kids. But once you get into middle and highschool, I think as a kid there is a "coolness" factor to using the same stuff that the pros use. Since at that point you are trying to be an adult, you are trying to do stuff the right way, and hey you might be getting a real job in the field just a couple years anyways. So there is some value I think in making just more friendly of an environment and on boarding process to a tool.
- phendrenad2 3y agoAt the very least, you can always run Borland Turbo C++ on Windows 2000 in a VM.
- Solvency 3y agoIt's called Processing.
- mschaef 3y agoThe other divergence is in expectations. A kid in the early to mid-80's could get enough working that they could imagine it possible to match a store bought game. Once hardware capabilities went up, so did the need for more specialized skills and longer development cycles. Even though it might have still been possible to draw a box on the screen with a single command, the relationship of that box to a valuable outcome was a lot less obvious.
- ncruces 3y agoOnly if people loose the ability to appreciate simple things. 2048 is a lot of fun. So is wordle. Or the xor game that made HN a week ago.
- mschaef 3y agoFlappy Bird too, for that matter.
- ambigious7777 3y agoI didn't see that "xor game" (probably becuase I went on vacation), would you mind linking it for me?
- ncruces 3y agoMy primary school kid loved it. https://news.ycombinator.com/item?id=39323511 https://news.ycombinator.com/item?id=39323511
- jasonfarnon 3y agotetris, 1948
- josephg 3y agoWhen I was teaching programming my go-to was the JavaScript canvas api. It’s 2d only, and very simple. And being on the web once a student has made something we can host it for them and they can show their friends. I have a ~20 line html harness which sets up a page with a full screen canvas element and gives you global window width & height variables. That’s all you need to get started. And it’s real JavaScript - so students learn a useful programming language as a result, and the advanced students can go nuts and add sprites, sound and networking if they really want to.
- xyzelement 3y agoAny chance you have an example of what you are talking about
- josephg 3y agoYeah this is the template I use. As I say - its like, ~20 lines of boilerplate: http://josephg.com/canvas_f.zip http://josephg.com/canvas_f.zip I tell people to leave the html file alone and edit the javascript, using the canvas API to make it draw whatever they want. Canvas supports text, shapes and images and translations / transformations. If they want, I show them how to animate their work as well. People make fun cursed things like this: https://home.seph.codes/public/niamh/ https://home.seph.codes/public/niamh/
- mct 3y agoAnother option is to use the p5.js library. They also have a nice online editor, at https://editor.p5js.org/ https://editor.p5js.org/, which makes it easy for students to get up and running quickly.
- anta40 3y agoI'll most likely pick FreeBASIC or Python for teaching kids simple graphics programming. FreeBASIC has a QB-compatiblity mode, so using old QB tutorials shouldn't be a problem. Or Python for 3D stuffs.
- m000 3y agoI kind of envy you for having access to Borland Turbo C++ and learning resources for it as a kid. The closest I could get to it was reading a review on my local computing press. Even assuming I could magically get a copy, I still wouldn't know what to do with it without reading material. And even if I had the reading material, I'm not sure how much I would make out of it with my fledgling knowledge of English at the time.
- elzbardico 3y agoI wouldn't have access too if it were not for the local pirate scene. Even owners of local software houses doing professional accounting systems didn't mind copying a few disks of software they paid for to a kid who knew how to ask. If you got something new, you'd immediately share with your colleagues. And everybody kept in mind that if we ever started making money from our hobby, one of our first investments would be into buying properly licensed copies of the tools we used.
- jerry_tk 3y agoBorland Turbo C++ (and Pascal as well) had great help documentation. Every function was thoroughly explained and there was a lot of examples. I learned C just by reading Turbo C++ help docs. I miss that time.
- zozbot234 3y agoModern 2D graphics are not based on plotting pixels to a framebuffer, they have "textures" or "surfaces" as a native part of the system and any compositing is done as a separate step. So if anything making "simple sprites" has become a bit easier since you can just think of any composited surface as a more generic version of a hardware sprite.
- ecshafer 3y agoI think this is more simple from the pov of making a game engine from scratch or a game with complex effects and graphics. But is it more simple from the pov of a high schooler that just wants to get some flat colored shapes on the screen?
- zozbot234 3y agoEven rendering "flat colored shapes" efficiently can be a bit non-trivial if you expect pixel-perfect results, like you'd get by plotting to an ordinary framebuffer - the GPU's fixed rendering pipeline is not generally built for that. The emerging approach is to use compute shaders, and these are not yet fully integrated with existing programming languages - you can't just edit ordinary C++/Rust code and have it seamlessly compile for CPU and GPU rendering. But we're getting closer to that.
- hnthrowaway0328 3y agoI'm curious how does the texturing work in the SDL backend? I did not read the code but am curious now. Back in the day I heard about of a friend who claimed to write some 2d framework which was faster than Direct2D -- that was a pretty early version of Direct2D I think.
- krapp 3y agoSDL is a cross platform library, so it works by just using whatever native rendering context is available, abstracted to a common API. In more general terms AFAIK it uses the geometry API under the hood and just pushes triangles/quads to the GPU whenever possible.
- JohnFen 3y ago> I learned to program in Borland Turbo C++. That still reigns as my favorite IDE of all time by a country mile.
- qingcharles 3y agoMy first real IDE and still my favorite IDE.
- pjmlp 3y agoSame here, going into UNIX back in the early 1990's, after using the Borland IDEs across MS-DOS and Windows 3.x (and being aware of their OS/2 versions), felt like time travel to the genesis of programming, CP/M style. Thankfully a professor pointed us to XEmacs, which I managed to get my Borland experience back, which became my UNIX companion until KDevelop, Eclipse, Netbeans came to rescue.
- anthk 3y agoEarly 90's, but later you had WPE and XWPE.
- zackmorris 3y agoOne thing from back then that I really miss is how easy it was to do some complex things. This might be my biggest disappointment with "modern" programming. I want direct access to the hardware with stuff like $100 1GHz 100+ core CPUs with local memories and true multithreaded languages that use immutability and copy-on-write to implement higher-order methods and scatter-gather arrays. Instead we got proprietary DSP/SIMD GPUs with esoteric types like tensors that require the use of display lists and shaders to achieve high performance. It comes down to the easy vs simple debate. Most paradigms today go the "easy" route, providing syntactic sugar and similar shortcuts to work within artificial constraints created by market inefficiencies like monopoly. So we're told that the latency between CPU and GPU is too long for old-fashioned C-style programming. Then we have to manage pixel buffers ourselves. We're limited in the number of layers we can draw or the number of memory locations we can read/right simultaneously (like how old arcade boxes only had so many sprites). The graphics driver we're using may not provide such basic types as GL_LINES. Etc etc etc. This path inevitably leads to cookie cutter programming and copypasta, causing software to have a canned feel like the old CGI-BIN and Flash Player days. Whereas the "simple" route would solve actual problems within the runtime so that we can work at a level of abstraction of our choosing. For example, intrinsics and manual management of memory layout under SSE/Altivec would be substituted for generalized (size-independent) vector operations on any type with the offsets of variables within classes/structs decided internally. GPUs, FPUs and even hyperthreading would go away in favor of microcode-defined types and operations on arbitrary bitfields, more akin to something like VHDL/Verilog running on reprogrammable hardware. The idea being that computers should do whatever it takes to execute users' instructions, rather than forcing users to adapt their mental models to the hardware/software. Cross-platform compilation, emulation, forced hardware upgrades that ignore Turing completeness, vendor/platform lock-in and planned obsolescence are all symptoms of today's "easy" status quo. Whereas we could have the "simple" MIMD transputer I've discussed endlessly in previous comments that just reconfigures itself to run anything we want at the maximum possible speed. More like how a Star Trek computer might run. In practice that would mean that a naive for-loop on individual bytes written in C would run the same speed as a highly accelerated shader, because the compiler would optimize the intermediate code (i-code) into its dependent operations and distribute computation across a potentially unlimited number of cores, integrating the results to exactly match a single-threaded runtime. The hoops we have to jump through between conception and implementation represents how far we've diverged from what computing could be. Modern web development, enterprise software, a la carte microservice hoards like AWS that eventually require nearly every service just to work, etc etc etc, often create workloads which are 90% friction and 10% results. Just give me the good old days where the runtime gave us everything, no include paths or even compiler flags to worry about, and the compiler stripped out everything we did't use. Think C for the Macintosh mostly worked that way, and even Metrowerks CodeWarrior tried to have sane defaults. Before that, the first fast language I used, called Visual Interactive Programming (VIP), gave the programmer everything and the kitchen sink. And HyperCard practically made it its mission in life to free the user of as much programming jargon as possible. I feel like I got more done between the ages of 12 and 18 than all the years since. And it's not a fleeting feeling.. it's every single day. And forgetting how good things were in order to focus on the task at hand now takes up so much of my psyche that I'm probably less than 10% as productive as I once was.
- Keyframe 3y agogood old conio.h and Borland's BGI graphics.h :) SDL is kinda there for that today, albeit not as simple.
- cmpxchg8b 3y agoxlib > bgi. That thing was so "powerful" it destroyed my monitor using a mode with suspect timings :D
- Arnavion 3y agoComputer Science classes in Indian schools (fifth to eighth grades in my case) taught programming using Borland Turbo C++. That was back in the 2000s, but I wouldn't be surprised if they still use it today.