Flask is a wonderful Python microframework for server-side web development.
I haven't used Flask for a year or so, outside of the horrifying, grindy refactoring I've been doing at work, so I decided to hack together a little Tumblr clone. Overall, this thing took me about two days to complete.
This was also a great chance to brush up on using the SQLAlchemy ORM, as well as learning a few Flask extensions I want to use in some future projects (Flask-Login, Flask-Assets), and some fun features of Jinja2 that I'd never used before.
Since this is a random side-project, I didn't use a heavy CSS framework, but just hacked up the CSS on-the-fly; I think that gave the UI a nice early-to-mid 2000s feel.
Added a database library just to connect and manage database tasks (for SQLite3) and created a .sql
script to create the empty database on installation/update.
About 1'5h expent into this, closing the deadline!
Well. maybe I'm failing somewhat to the weird stuff to more experienced programmers, but in my environment seems pretty weird that I'm spending time to learn to automate tests in the browser with things like puppeteer.
So, now, behold!
My first steps on testing in headless browsers! :-D
https://gist.github.com/tzkmx/441ddf10df8adbb5abbc433775fb86c0
Hey, it's my first post here so I will give a little bit of context. I'm building a web platform using lapis(My first time using lapis) , to allow people to look for jobs.
Today code:
Today I implemented the back end for a university forum.
Finished the university forum initial backend.
Checked projects code from leafo and Karai17 looking for lapis good practices.
Planed all the database needed for the application and created a migrations file in lua for lapis to generate the initial database.
Generated the database schema with the lapis migrations command.
Added new field for the job searching in the existing pages.
Started a new page to look for jobs by selecting the main categories icons.
Still in early stages :p (Usually I use bootstrap, but this time I'm trying materializecss )
I saw some guy on the internet who said that minesweeper was the easiest game to build that people will like very much.
So today I started making a minesweeper using Love2D and lua.
Already have some sprites, drawing of the map, drawing of pressed tiles, drawing of mines, flagged tiles, triggers to press the tiles and to put the flags when clicking with the mouse.
I'm starting now making the calculations for the neighborhood.
Added neighborhood calculations to display the numbers of mines in each cell.
Added red mark when selecting a mine, display all the other mines and present a you lost text.
Added expansion of the cells when clicking a cell with zero mines nearby.
Added specific colours for each of the numbers in the cells.
Today I finished all the core of the game:
Now that the base of the game is done, next days I will be focusing in usability and features to improve the gameplay.
Today I made a bit more of the job search platform:
Today I added prefill of the table search by using the search bar and multiple categories data.
Changed a bit the layout of a dashboard.
I tried some simple notes apps, but they always occupied too much of my visual monitor space, and didn't let me search older stuff easily. So today I built a simple reminder script to take notes and easily search them later. Full command line so I can grep my notes by full text search super easy.
I forget too many events, like birthdays, meetings, etc, so I started making a calendar which can prompt notifications in my desktop and maybe later send me emails. For the calendar I made a script to generate the events, which will ask for a date and a description. If all the formatting is correct it will save it.
I made another script which will check the next 5 days from the current day and generate a desktop notification for each event using the zenity tool and made a desktop file to trigger the script when the pc boots and the graphical environment starts.
Tasks done today:
Today I made a Entity Component System base skeleton in lua to understand how it works.
The objective with this is to migrate the minesweeper I built two week ago to this architecture, and see if its so good as people suggest.
I already saw multiple really nice possibilities with this architecture, but lets only take conclusions after having something concrete implemented in it.
Today I created systems to render the minesweeper map blocks and detect the clicking in them.
I created the main components Block, Rect and Point.
Generated an entity called map_block to hold the 3 components.
This allows me already to have all the map rendering and triggering of the input state changes for each of the blocks.
The ECS is being a nice experiment, I can apply the logic in a more focused way to the components, which allows me to have an easier time when splitting responsibilities in the code.
I'm still checking out how to make interaction between multiple entities, lets see how it goes tomorrow.
Research about how ECS is usually used in Lua
Done Today:
Added input component.
Added delay for multiple clicks in the same input.
Added initialization of the mines across the map.
Research solution for communication between systems, and triggering of actions like checking some condition to validate the end of the game when a block mine is clicked.
After the yesterday thoughts, today I added events to my ECS architecture:
Today I worked in the web platforms.
Read documentation given by clients and prepared requirements, tasks and all of that to the next work days.
In the Lapis application, made my forms use the table information to make automatic validation in the backend when the form post is received.
Today I made just little changes, I added logging to errors detected by the validation in my forms, which uses the lapis validation.
Since lapis already gives me all the feedback about the invalid fields, it was really simple to make :) . Lapis is very nice.
Added validator to the forms to allow the comparison of 2 fields when in validation.
Implemented user creation with encripted password.
Started the creation of organizations.