Michiel Van der Blonk

@blonkm (22) • Gameskool
Programmer, teacher, speedcuber, runner, living in Aruba.
why this code is showing errors and not compiling please help!!!
posted to Ask by Abhisheksharm28

I solved it for you, see https://repl.it/@blonkm/Abhisheksharm28
Your brackets aren't matching up, static wasn't used properly and a was used twice.
Make sure to always call static methods from static methods, and non-static methods from non-static methods. Then you should be ok.

Quick Game I made
posted to Share by AshwinBose

This is like the google dinosaur game in chrome when internet connection is gone.

$ dev spotlight12.p6: DOLLAR SIGNS WILL NOT KILL YOU. Preaching the good word of Perl 6.
posted to Announcements by katyadee

@katyadee I know but I think it's a sign of the sorry state of education. Too many are learning from mediocre programmers without a sense of 'code poetry' (readability, maintainability, loose coupling, tight cohesion). Also this wasn't meant as criticism towards Alan, he's not the only one learning programming through a crooked path. The industry has always been about quick gains and quick bucks and not the beauty and joy of programming unfortunately.

conways game of life
posted to Ask by aq193142

pseudocode:

for each cell
  n = count live cells around this cell
  if n==2 or n==3
    live
  else
    die
Any improvements I should make to my website?
posted to Ask by JamesGordon1

try and use a color calculator to improve design. https://www.sessions.edu/color-calculator/

What's going wrong?????
posted to Ask by KobeFF

Your inputs are strings (text). Text cannot do math. You need to convert the input to numbers using float() or int().
see
https://www.includehelp.com/python/read-input-as-a-float.aspx

Global variable.
posted to Ask by Baconman321

@Baconman321 What you need for that is a database. That seems too far ahead for you right now. I would stick to one page and get everything working and then start thinking about learning about a database.
Remember that a web page is just a page. Users connecting to it will not magically know about other users. A database is a separate entity that can connect to your web server.

USERS <===> WEB SERVER <===> DATABASE

Users will never see the database. The Web server has a really short memory, and can only work with one user at a time.

Can anyone complete this code?
posted to Ask by ChristianRatcli

grades.length already is the number of items. What you're doing with executions is unnecessary.

How can I get this into a loop properly?
posted to Ask by morliehayes

@SilentShadows12 however without proper indents Python will not run this correctly.

How do I multiply Percent by a number using Javascript?
posted to Ask by Larosario

Instead of doing

        var n1 = document.getElementById('n1').value;

use

        var n1 = parseFloat(document.getElementById('n1').value);

That way you can immediately work with floats all the way. If you later need to round the values you can use

        var n1 = Math.round(n1);
Taking a final
posted to Ask by kle11257

Do the courses on repl.it, they're pretty good. Make sure you read a lot and get your computer basics in order (what is memory, bits, bytes, types).

How do you manage your projects?
posted to Ask by Vandesm14

I use workflowy.com in which I plan everything up to the tiniest details, including when I have to go shower, eat or get up. If I think of a task I put it in, I check the todo-list every 30 seconds of the day.

Global variable.
posted to Ask by Baconman321

Every php page you run is a process on it's own which does not have variables.

$feedbacka=var_dump($feedback);

will never work in seefeedback.php. The variable $feedback is not set because the page has no idea it exists.
You need a way to communicate between pages. This can be done through cookies as you tried, but it's better to either use:

  • the url (as in ?feedback=...)
  • a hidden field in a form, and using JavaScript to submit the form.
  • a session variable $_SESSION['feedback'] = ...

also test all your code using a php linter, e.g. https://phpcodechecker.com/

NEED Inspiration for Code
posted to Ask by SilentShadowBla

As a teacher, I've been looking for an awesome, free quiz program. I have used QuizMaker (Flash based), online php options (butt ugly), Schoology (needs an account), and several others.

So requirements:

  • multiple choice, text, multiple response, hotspot
  • add html
  • automatic grading
  • randomize questions and answers
  • completely free (open source or hosted)
  • saves answers to a database (mysql e.g.)
  • export data
  • no walled frameworks or requirements like node or iOS. Preferably plain PHP with mysql, or a native Windows app, but still with central database.
  • option to run offline
  • run on linux or windows server
  • optionally run on mobile
  • beautifully styled
  • unlimited students
  • unlimited quizzes
  • unlimited questions
  • fast and responsive

I'd be willing to help out if it's on a stack I know.
Am I asking too much? ;-)

Repl.it Desktop 😯
posted to Ask by PDanielY

@PDanielY However, a website can also be offline and sync changes when there is wifi. It's all supported by browser standards. https://itnext.io/how-to-make-your-website-work-offline-b5be47b92adc

I'm trying to create a website?
posted to Ask by RngdMySt

You have errors in your html, use https://validator.w3.org/ and also https://jigsaw.w3.org/css-validator/

Is there a keyboard shortcut to clear the console?
posted to Ask by blonkm

@Zexogon I use JavaScript mostly. I found CTRL+L which cleans the screen and sets the cursor to the top, but it leaves the entire history, whereas the button on the top right clears everything.

Where to find interesting projects
posted to Ask by blonkm

@Haaruun that is exactly the kind of thing I am looking for, also for my github projects. Many many thanks and a happy new year to you!

Where to find interesting projects
posted to Ask by blonkm

@Haaruun How to find those hackathons?

Where to find interesting projects
posted to Ask by blonkm

@theangryepicbanana not really, most are cries for help where people are stuck, and 99% are individual projects. I'm looking more at interesting projects where already a team is working on something or just has an idea. Perhaps a discussion board where you can post ideas and when you want to join you add yourself. I find it very hard to find projects I can join.

$ dev spotlight12.p6: DOLLAR SIGNS WILL NOT KILL YOU. Preaching the good word of Perl 6.
posted to Announcements by katyadee

Python should not be the one teaching you to indent. It should be done because your code is a big mess if you don't indent.

why this code is showing errors and not compiling please help!!!
posted to Ask by Abhisheksharm28

@Abhisheksharm28 I did so because Adder was part of Main and Java told me I can't reference Adder from within like that. This is a limitation of Java. So now I have instead moved Adder to its own file, and removed the static keyword. All is still working, proving you don't need static at all (except for the main method, which is called once and thus needs to be defined as static).

Embed using script tag
posted to Ask by blonkm

@timmy_i_chen sorry for the late reply but yes that is exactly what I meant.

👋✨Introduce yourself 🎉😀
posted to Announcements by amasad

I am Michiel, I am a computer skills teacher on Aruba. I use repl for my classes at school, and for my online courses at gameskool.org where I teach people programming to become game developers/designers.

I have experience in a bunch of languages, mostly C, PHP, JavaScript, BASIC, some Java, assembler, python. Lately I have taken an interest in learning a bit about neural networks.

For the rest, I am into movies, books, writing, speedcubing, running, and martial arts.

👋✨Introduce yourself 🎉😀
posted to Announcements by amasad

@hayaodeh I remember you. Perhaps you even remember me. I think I was on repl in the early days (I don't know when repl started exactly). Anyway, hi!

View your timestables!
posted to Share by iiGalacticBeast

good. you should add an option to quit the program.