Skip to content

Commit

Permalink
Notes after talk
Browse files Browse the repository at this point in the history
Aweful code example! for code review
  • Loading branch information
calaldees committed Nov 8, 2024
1 parent 4bf9386 commit a7d72ca
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
4 changes: 4 additions & 0 deletions book/BarCamp2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ Preface: Computing Education Sux
* 3 months of network theory
* (Neither of those are relevant to the young persons)
* The Computing GCSE is not relevant to most young people
* [Number of girls in England taking computing GCSE plummets, study finds](https://www.theguardian.com/technology/article/2024/jun/27/number-of-girls-in-england-taking-computing-gcse-plummets-study-finds)
* > Introduction of new syllabus may be reason number of girls taking subject more than halved in eight years, academics say
* Q: So what is important for young people?
* The grand answer: Self actualization and altering the world though self action and building something
* The simple answer: Choose to build shit
Expand All @@ -53,6 +55,7 @@ The only way to get the exposure (time) and challenge (appropriate difficulty) i
* [Children should be allowed to get bored, expert says](https://www.bbc.co.uk/news/education-21895704) BBC March 2023
* To develop autonomy and creativity
* We have robbed our young people of this opportunity
* [Teenagers who watch screens in free time 'do worse in GCSEs'](https://www.theguardian.com/education/2015/sep/04/teenagers-who-watch-screens-in-free-time-do-worse-in-gcses)

### Learner Autonomy

Expand Down Expand Up @@ -89,6 +92,7 @@ Who can sit for hours and hours in a seat doing stuff they are told to do?

### Stop using ...

* Realtime manipuation of state - you can see and feel your code manifest into reality ... but
* 'Games' to teach programming
* The entirety of all of computing ... and the only think you can think of that has worth is trivially using it for entertainment. Thats lame.
* Focusing on games alienate some demographics and trivializes the discipline.
Expand Down
35 changes: 35 additions & 0 deletions teachprogramming/static/projects/code/aweful.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From https://x.com/Papers_app/status/1853037407358095724
I'm just in awe of how bad this code is! Can you disect it!
```html
<script>
function authenticateUser (username, password) {
var accounts = apiService.sql(
"SELECT * FROM users"
);
for (var i = 0; i < accounts.length; i++) {
var account = accounts [i];
if (account.username === username &&
account.password === password)
{
return true;
}
}
if ("true" === "true") {
return false;
}
}
$('#login').click(function() {
var username = $("#username").val();
var password = $("#password").val();
var authenticated authenticateUser (username, password)
if (authenticated === true) {
$.cookie('loggedin', 'yes', { expires: 1 });
} else if (authenticated === false) {
$("error_message").show(Log In Failed)
}
});
</script>
```

0 comments on commit a7d72ca

Please sign in to comment.