Learning from other people's code is neat!
I think it would be cool to make code easier and less intimidating to read and understand by writing some "code walkthroughs", which walk the reader through some nifty code, exploring how problems were solved, explaining how the code works, giving the necessary information to understand it, et cetera!
The HTML (except for Proxy) was generated by Locco.
Code walkthroughs
Code walkthroughs
Last edited by Santos on Thu Oct 20, 2016 4:51 pm, edited 4 times in total.
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Code walkthroughs
Holy - .
That's an impressive work...
Stickied, I'll read it after, then i'll provide some feedback.
That's an impressive work...
Stickied, I'll read it after, then i'll provide some feedback.
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: Code walkthroughs
This is awesome.
I also like the changes you made.
Feel free to make a pull request. I'll accept it right away.
I also like the changes you made.
Feel free to make a pull request. I'll accept it right away.
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Code walkthroughs
Just read the whole thing.
And I must say, well done, Santos!
Actually, Josef's code was very clean (hence easy to figure out!).
I didn't know about that tool. That's a brilliant idea, by the way.
I may have missed it in the Projects And Demos section.
@Santos: Maybe you will write next some other code walktroughs (would be amazing!). So, why not edit the your OP, insert a bulletlist of all of them and keep it updated ?
And I must say, well done, Santos!
Actually, Josef's code was very clean (hence easy to figure out!).
I didn't know about that tool. That's a brilliant idea, by the way.
I may have missed it in the Projects And Demos section.
@Santos: Maybe you will write next some other code walktroughs (would be amazing!). So, why not edit the your OP, insert a bulletlist of all of them and keep it updated ?
- josefnpat
- Inner party member
- Posts: 955
- Joined: Wed Oct 05, 2011 1:36 am
- Location: your basement
- Contact:
Re: Code walkthroughs
I'm glad people like it. The code imo was never clean or stable enough to really justify a thread, so I never opened one.Roland_Yonaba wrote:Just read the whole thing.
And I must say, well done, Santos!
Actually, Josef's code was very clean (hence easy to figure out!).
I didn't know about that tool. That's a brilliant idea, by the way.
I may have missed it in the Projects And Demos section. :ultrahappy:
@Santos: Maybe you will write next some other code walktroughs (would be amazing!). So, why not edit the your OP, insert a bulletlist of all of them and keep it updated ?
Missing Sentinel Software | Twitter
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
FORCIBLY IGNORED.
<leafo> when in doubt delete all of your code
<bartbes> git rm -r *
<bartbes> git commit -m "Fixed all bugs"
<bartbes> git push
Re: Code walkthroughs
I'm happy you two like it!
inifile.lua by bartbes has been added!
inifile.lua by bartbes has been added!
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Code walkthroughs
That's brilliant!
Some glitches, by the way. On the right side of the page, there's a weird statement to delete... just before function inifile.save(name, t).
And after that, there is a little mistake with a patten matching string.
That could be very interesting lecures for those starting both Lua/Löve, cause there are so many things to learn from this.
Some glitches, by the way. On the right side of the page, there's a weird statement to delete... just before function inifile.save(name, t).
love.graphics.rectangle(mode, x, y, width, height)
And after that, there is a little mistake with a patten matching string.
Must be replaced by:String methods can be used on literal strings if the strings are within parentheses.
In this case, ("[s]\n"):format(section) is equivalent to string.format("[s]\m", section).
Once again, good job!String methods can be used on literal strings if the strings are within parentheses.
In this case, ("[%s]\n"):format(section) is equivalent to string.format("[%s]\n", section).
That could be very interesting lecures for those starting both Lua/Löve, cause there are so many things to learn from this.
Re: Code walkthroughs
wow this is amazing.
Really helpful and a good way to explain people like me how things work.
Good job!
Really helpful and a good way to explain people like me how things work.
Good job!
Re: Code walkthroughs
Thanks so much Roland, both places have been fixed.
And thanks Larsii30, I'm glad that you like it, feel free to let me know if anything doesn't make sense or could have been explained better, or any other suggestions or critiques you have!
And thanks Larsii30, I'm glad that you like it, feel free to let me know if anything doesn't make sense or could have been explained better, or any other suggestions or critiques you have!
- bartbes
- Sex machine
- Posts: 4946
- Joined: Fri Aug 29, 2008 10:35 am
- Location: The Netherlands
- Contact:
Re: Code walkthroughs
That was awesome! And while I'm at it, I might as well thank you for using inifile.lua for such a great tutorial, so thanks!
One minor detail though, your requires are wrong, you forgot to remove the extension .
One minor detail though, your requires are wrong, you forgot to remove the extension .
Who is online
Users browsing this forum: No registered users and 3 guests