ComputerScientist
174 subscribers
14 photos
3 files
206 links
▜ The Inventor

Stuff that inspire you to create.

See also: ▙ @LitMind
Download Telegram
You cannot control what you cannot see [or feel].

You cannot send meaningful input to what from which you cannot recieve meaningful output.
instance place vs. place meeting

Having merged and summarized the information found in the documentations of both GMS1.3 and GM8, I've prepared the following comparison. In the end you will find that they are both the same rountine, only they return different things. According to the documentation of GMS1.3, place_meeting is slightly faster than instance_place.

These functions let you check a position for a collision against some object, using the collision mask of the current instance. These effectively move the instance to the new position, check for a collision, move it back and tell you if a collision was found or not.

These will work for precise collisions, but only if both the instance and the object being checked for have precise collision masks selected otherwise only bounding box collisions are applied.

// place_meeting(x, y, obj) returns whether the instance placed at position (x, y) meets obj

if keyboard_check(vk_left) if not place_meeting(x-5, y, wall) then x -= 5


// instance_place(x, y, obj) returns some obj, or noone, met when the current instance is placed at position (x, y)

with instance_place(x, y, enemy) {
other.hitpoints -= damage
instance_destroy()
}


In both, obj can be an object, an instance, all, or other; however the documentation on GM8 lacks allowing other for obj in instance_place
When a program is being stupid, i.e. acts against common sense, resolve the issue by asking yourself how you know, that which you know. How is the issue ridiculously obvious to you? Implement a copy of the same thinking pattern into your program. That's all high level programming is about.
“...There are many people who blog and otherwise publicly discuss development methodologies and what they're working on, but there are even more people who don't. Blogging takes time, for example, and not everyone enjoys it. Other people are working on commercial products and can't divulge the inner workings of their code.

That [sic] we're unable to learn from the silent majority of experts casts an unusual light upon online discussions. Just because looking down your nose at C++ or Perl is the popular opinion doesn't mean that those languages aren't being used by very smart folks to build amazing, finely crafted software. An appealing theory that gets frantically upvoted may have well-understood but non-obvious drawbacks. All we're seeing is an intersection of the people working on interesting things and who like to write about it—and that's not the whole story.”

— James Hague, The Silent Majority of Experts
When one gets so immersed in the theoretical that they forget how wonderful it is to make amazing and useful things, these things may help them recover:

Be practical: stay out of technical forums unless it's directly relevant to something you're working on.

Do: work on real projects related to your area of interest.

• If you hate a technology, learn and use it.

• If you love a technology, don't insist that everyone else use it too.

Create experiences: Be more of an experience designer than a software engineer. Focus on the beauty of the end result rather than the beauty of its code.

• Make some kind of art.

• Read all kinds of stuff.

— Summary of Recovering From a Computer Science Education
“To illustrate this, I often ask teachers to write 4x and 4½. I then ask them what the mathematical operation is between the 4 and the x, which most realize is multiplication. I then ask what the mathematical operation is between the 4 and the ½, which is, of course, addition. I then ask whether any of them had previously noticed this inconsistency in mathematical notation — that when numbers are next to each other, sometimes it means multiply, sometimes it means add, some times it means something completely different, as when we write a two-digit number like 43. Most teachers have never noticed this inconsistency, which presumably is how they were able to be successful at school. The student who worries about this and asks the teacher why mathematical notation is inconsistent in this regard may be told not to ask stupid questions, even though this is a rather intelligent question and displays exactly the kind of curiosity that might be useful for a mathematician — but he has to get through school first!”

— Dylan Wiliam, Embedded Formative Assessment, 2011, p53
A decent text viewer/editor for Android users: QuickEdit
“Depending on the project, I tend to pick one of:

BSD 2/3: for stuff I really want to get out there, (by giving out pretty much all rights except redistribution, and it just requires the license notice for that)
MIT: for stuff I want to be named on,
WTFPL: for stuff I do for the community.”

#TheSemicolon, on how he chooses a license for his GitHub repositories
A framework uses your code.
A library is used by your code.
“There will come a point where the accumulated complexity of our existing systems is greater than the complexity of creating a new one. When that happens all of this shit will be trashed. We can flush boost and glib and autoconf down the toilet and never think of them again.”
— Ryan Dahl, I hate almost all software
“Reason is like an open secret that can become known to anyone at any time; it is the quiet space into which everyone can enter through his own thought.”
— Karl Jaspers
“Why program by hand in five days what you can spend five years of your life automating.”
— Terence Parr
“A beautifully crafted library with no documentation is damn near worthless. If your software solves the wrong problem or nobody can figure out how to use it, there’s something very bad going on.”
— Tom Preston-Werner, Readme Driven Development
“He who imagined a ship towers considerably above him who imagined innate ideas.”
— Francois Voltaire
ComputerScientist
Epigrams in Programming _ Computer Science.pdf
Epigrams in Programming by Alan Perlis
20 select, out of 120

2. Functions delay binding; data structures induce binding. Moral: Structure data late in the programming process.

8. A programming language is low level when its programs require attention to the irrelevant.

19. A language that doesn't affect the way you think about programming, is not worth knowing.

20. Wherever there is modularity there is the potential for misunderstanding: Hiding information implies a need to check communication.

23. To understand a program you must become both the machine and the program.

30. In programming, everything we do is a special case of something more general – and often we know it too quickly.

31. Simplicity does not precede complexity, but follows it.

32. Programmers are not to be measured by their ingenuity and their logic but by the completeness of their case analysis.

39. Re graphics: A picture is worth 10K words - but only those to describe the picture. Hardly any sets of 10K words can be adequately described with pictures.

46. Like punning, programming is a play on words.

54. Beware of the Turing tar-pit in which everything is possible but nothing of interest is easy.

63. When we write programs that "learn", it turns out that we do and they don't.

79. A year spent in artificial intelligence is enough to make one believe in God.

95. Don't have good ideas if you aren't willing to be responsible for them.

106. It's difficult to extract sense from strings, but they're the only communication coin we can count on.

112. Computer Science is embarrassed by the computer.

113. The only constructive theory connecting neuroscience and psychology will arise from the study of software.

114. Within a computer, natural language is unnatural.

115. Most people find the concept of programming obvious, but the doing impossible.

119. Programming is an unnatural act.
“What is [mathematics] other than the incomprehensible outpourings of superpowered brainboxes, with their heads in the clouds and their feet dangling from the lofty balconies of their ivory towers?”
— Ian Stewart
Mathematics is overspecialized syntax expressing overgeneralized semantics.
“... es ist wahr, ein Mathematiker, der nicht etwas Poet ist, wird nimmer ein vollkommener Mathematiker sein.”

Translation from German
“... it is true that a mathematician who is not somewhat of a poet, will never be a perfect mathematician.”
— Karl Weierstrass, 1883
“The miracle of the appropriateness of the language of mathematics for the formulation of the laws of physics is a wonderful gift which we neither understand nor deserve.”
— Eugene Wigner