#coding tips
Explore tagged Tumblr posts
Text
【☆】 Coding Study Tips
Some study info + tips on cramming coding/programming concepts~!
#izicodes tips#coding tips#codeblr#coding#programming#progblr#studyblr#study motiviation#study aesthetic#studying#studyspo#academia#study motivation#study inspo#study inspiration
332 notes
·
View notes
Text
pro tip for programmers - how to alias
hey, so you know that annoying thing that happens when you're coding, and you need to run/test the same program 100 times in a row, so you end up typing "python3 testScriptWithASuperLongName.py" into the terminal about 80,000 times?
well, there's a better way! it's called aliasing :D
in your bash shell (or zsh, or whatever shell you use, but bash is the default on VSCode and most people on tumblr use VSCode, so I'm using bash as the default to explain this concept) you can set an alias, essentially a shortcut command, that runs longer commands.
(yes you can just use the up arrow key to re-run the same command, but sometimes you're typing other things into the terminal too and you don't feel like hitting the up arrow key four times in a row, and also this is just a cool and useful tip to get comfortable with aliasing so shhhh)
so, in your terminal shell, just type this:
alias run="python3 testScriptWithASuperLongName.py"
now, you can run that entire super long command, just by typing the word "run" into your terminal. Here's a screenshot of an example on my computer to make it make more sense:
in this example, i just created a simple python file that contains one line of code: print("it works!")
then, as you can see, by setting the alias to run, i can now run that file, runningatestscript.py, simply with the command 'run'.
the best part is, this alias is temporary - it only lasts as long as your shell session is open. so once you close the terminal, the run alias is cleared and you can set it again next time to any file or task you're currently working on, to save yourself a lot of typing, typos, and time.
so if you want to, you can get in the habit of always setting a run alias in the VSCode terminal for whichever file you're working with as soon as you get everything open. that way, when you need to run the same file 50 million times, you have a super easy way of doing it! you can even set it to a single letter if you want to go for maximum speed, but i prefer to use whole short words, because they're easy for me to remember.
note: if you do want to set an alias to work for all sessions, you can simply add it to your ./bashrc file. this is a common way to automate repeatable tasks, and simply to set easier-to-remember commands for terminal commands that are really complicated/confusing/hard to remember.
for example, i saved the alias checkboot="[ -d /sys/firmware/efi ] && echo 'UEFI mode' || 'BIOS mode'" into my zshrc file (zsh equivalent of bashrc file). this way, no matter how many times i rebooted my machine, i would always be able to quickly check which boot mode was running by simply typing 'checkboot'.
yesterday i was updating my boot mode from BIOS to UEFI on my very old machine that is technically compatible with UEFI, but not configured for it by default. So it was extremely helpful and saved me the time and headache of having to remember and type that long-ass command a thousand times in between many different reboots and new shells.
if you have any tasks like that, or terminal commands that you know would be useful to you, but you can never remember them when you need them, i highly recommend getting comfortable with aliasing! it can be super useful to simply set custom aliases for all the commands you don't want to remember, so that you can automate things away and not have to worry about so much linux syntax all the time when you're tring to focus on programming.
i know this may seem like a simple tip to some, but i only learned about it recently and it's been extremely helpful to integrate into my workflow and customize my OS with! so i thought it might be worthwhile to some people if i share :) hope it helps!
#codeblr#linux#hacker#compsci#hack the planet#hacking#studyblr#coding#progblr#programmer#programming#women in tech#women in stem#women in computing#women in cs#comp sci#coding tips#programming tips#software development#software developers#vscode
114 notes
·
View notes
Note
heyy, i am the anon of the last ask, and i was referring to adding a background image to the sidebar. sorry for the confusion😅
Ah okay! I use Twine Sugarcube to code, so this won't work for any other story format. You can easily add a background image to the UI bar by adding something like this in the stylesheet:
Here, the background-image is where I'll add the source for the background image I want to include in my UI bar. You'll need to figure out media queries because different screens will display the image differently depending on the size of the image you're using.
I cheated because I didn't want to go through learning about media queries and just used a huge background image (think desktop wallpaper size) and because it was an image that I didn't really care how it appeared on different screens, it worked out fine for me.
In this example, I'm using a local folder/location for my images because I didn't want to rely on an image hosting site to do that, you'll just have a folder within your game folder named images (or whatever you want it called) and that's where you will add your background image for your UI bar.
So if your images folder is called pics and your background image is called bg_image.png, you will add something like this within your stylesheet:
#ui-bar: { background-image: [img[pics/bg_image.png]] }
In my example, I've added a background colour as well, in case the image fails for whatever reason and I've also added other properties to style the way I wanted the image to look. You'll need to fiddle around with it a bit to see what works best for you, but there is a high chance if you're looking for a specific format for your picture, you're going to need to use media queries especially if the game is going to be played on different devices such as phones and desktops.
I hope this helps you and if you're still confused, please feel free to send in another ask/message!
27 notes
·
View notes
Text
Let the soothing sounds of lo-fi beats guide your introspection tonight. As you sink into the ambiance of downtempo music, consider: What energy are you cultivating with your daily choices—be it in lo-fi work music or chill beats for relaxation? Are you serving a higher purpose or caught in the rhythm of personal ambition? Let the chill lo-fi vibes spark your contemplation. Where does your focus lie, and what melodies are you composing in the symphony of your life? 🎶🌌 #lofi #ambientmusic #selfreflection
#Our Flag Means Death#artificial intelligence#memes#lo-fi study playlist#sunset views#lofi relaxation music#generative AI#lo-fi hip hop beats#pop culture#mental health#coding tips#indie music#chill beats for sleep#nostalgia
3 notes
·
View notes
Text
HTML & CSS Comment Tips
One valuable thing I have learned when starting any project is to include comments on your pages to provide a more structured layout.
For example, in HTML files, comments can be made with <!-- --->; anything within that space won’t appear on the page or be read by the browser.
A good way to use this in a page is to outline your areas, like in the image below.
Anywhere on your pages where you have a new section, you should use comments to outline what they are. This helps in a few ways. First, it increases readability for yourself and anyone else reading your code. Second, as your projects grow, doing this helps keep them organized.
It’s easier to add to and edit when you can find the area where you want to make changes or add classes based on the comment tags rather than trying to narrow it down through many <div> tags. Third, it helps with remembering what you were doing.
The same principles apply to CSS files, although comments are left in a CSS file type with /* */.
Using comments to outline the different style groups you intend to use in your projects can help you find the parts you want to edit. In general, using comments is something everyone should do. They are very helpful in JavaScript and other languages when making notes about what a function does or should be doing. You can also leave yourself notes about what you were working on.
#html#css#comments#code comments#tips#leave yourself notes#organization#structure#outline#coding tips
3 notes
·
View notes
Note
How did ypu create the settings, saves, etc. Icon links? I'm very stumped on how to do that.
Heyy ~
It's just a stylised <<link>> macro. The icons are from Font Awesome (make sure you import the icons in your Javascript file) so you can directly use the icons in html on the StoryInterface passage or wherever your UI is. I'm using cerberus' template and I have a separate passage for the menu. You'd write it like this for example :
<<link '<i class="fa-solid fa-gear"></i>'>><<script>>UI.settings()<</script>><</link>>
You have to write your Html inside the single quote, inside the link macro. You can add multiple html tags and classes to style the links however you want in CSS. After closing the first <<link>>, you can write what script that button is supposed to trigger. You can use <<script>> for something like UI.settings() or UI.saves(). If you want, instead of a script, to have a link to another passage or a website, you can write it just like you would with a normal <<link>> :
<<link '<a href="https://gthiah-if.tumblr.com/" target="_blank"><i class="fa-brands fa-tumblr"></i>tumblr</a>'>><</link>> <<link '<i class="fa-solid fa-heart"></i>credits' 'credits'>><</link>>
Hope that's what you were asking about, if not or if you still have questions, let me know :^)
15 notes
·
View notes
Text
Introduction: As a high school student in the 21st century, there's no denying the importance of computer science in today's world. Whether you're a seasoned programmer or just dipping your toes into the world of coding, the power of computer science is undeniable. In this blog, I'll share my journey as a 12th-grader venturing into the fascinating realms of C, C++, and Python, and how this journey has not only improved my computer science profile but also shaped my outlook on technology and problem-solving.
Chapter 1: The Foundations - Learning C
Learning C:
C, often referred to as the "mother of all programming languages," is where my journey began. Its simplicity and efficiency make it an excellent choice for beginners. As a high school student with limited programming experience, I decided to start with the basics.
Challenges and Triumphs:
Learning C came with its fair share of challenges, but it was incredibly rewarding. I tackled problems like understanding pointers and memory management, and I quickly realized that the core concepts of C would lay a strong foundation for my future endeavors in computer science.
Chapter 2: Building on the Basics - C++
Transition to C++:
With C under my belt, I transitioned to C++. C++ builds upon the concepts of C while introducing the object-oriented programming paradigm. It was a natural progression, and I found myself enjoying the flexibility and power it offered.
Projects and Applications:
I started working on small projects and applications in C++. From simple text-based games to data structures and algorithms implementations, C++ opened up a world of possibilities. It was during this phase that I began to see how the knowledge of programming languages could translate into tangible solutions.
Chapter 3: Python - The Versatile Language
Exploring Python:
Python is often praised for its simplicity and readability. As I delved into Python, I realized why it's a favorite among developers for a wide range of applications, from web development to machine learning.
Python in Real-Life Projects:
Python allowed me to take on real-life projects with ease. I built web applications using frameworks like Flask and Django, and I even dabbled in data analysis and machine learning. The versatility of Python broadened my horizons and showed me the real-world applications of computer science.
Chapter 4: A Glimpse into the Future
Continual Learning:
As I prepare to graduate high school and venture into higher education, my journey with C, C++, and Python has instilled in me the importance of continual learning. The field of computer science is dynamic, and staying up-to-date with the latest technologies and trends is crucial.
Networking and Collaboration:
I've also come to appreciate the significance of networking and collaboration in the computer science community. Joining online forums, participating in coding challenges, and collaborating on open-source projects have enriched my learning experience.
Conclusion: Embracing the World of Computer Science
My journey as a 12th-grader exploring C, C++, and Python has been an enlightening experience. These languages have not only improved my computer science profile but have also given me a broader perspective on problem-solving and technology. As I step into the future, I'm excited to see where this journey will take me, and I'm ready to embrace the ever-evolving world of computer science.
If you're a fellow student or someone curious about programming, I encourage you to take the plunge and start your own journey. With determination and a willingness to learn, the world of computer science is yours to explore and conquer.
#Computer Science#Programming Languages#Learning Journey#C Programming#C++ Programming#Python Programming#Coding Tips#Programming Projects#Programming Tutorials#Problem-Solving#High School Education#Student Life#Personal Growth#Programming Challenges#Technology Trends#Future in Computer Science#Community Engagement#Open Source#Programming Communities#Technology and Society
3 notes
·
View notes
Text
Welcome to InnovateHub TechTalk: Unleashing the Tech Frontier
Greetings, fellow tech enthusiasts, and welcome to the inaugural edition of InnovateHub TechTalk! I am Lucas Redford, your guide on this thrilling expedition into the boundless realms of technology. With each keystroke and pixel, we'll embark on a journey to unravel the mysteries, embrace the innovations, and discuss the trends that shape our digital world.
Charting New Horizons:
In the age of rapid technological advancement, it's impossible to ignore the transformative impact that technology has on our lives. From the moment we wake up to the time we rest our heads, technology surrounds us, empowering, entertaining, and evolving at an unprecedented pace.
Our Quest:
At InnovateHub TechTalk, our mission is simple yet profound: to ignite your curiosity and keep you informed about the dynamic world of technology. Whether you're a seasoned coder, a budding entrepreneur, a digital artist, or just someone intrigued by the possibilities, this platform is your haven.
What Awaits You:
As we embark on this voyage together, here's a glimpse of what you can expect from InnovateHub TechTalk:
Innovative Spotlights: Venture into the heart of innovation as we showcase groundbreaking technologies and inventions that are reshaping industries and society.
Tech Chats with Experts: Join me in engaging conversations with thought leaders, industry experts, and visionaries who are shaping the course of technology.
CodeCraft Corner: Whether you're a coding novice or a seasoned pro, our CodeCraft Corner will be your source for coding tips, projects, and insights to elevate your programming prowess.
FutureTalk: Delve into the crystal ball as we discuss emerging trends, speculative tech, and the potential future landscapes that await us.
Be a Part of the Conversation:
InnovateHub TechTalk is not just a blog; it's a community. Your thoughts, questions, and insights are the catalysts that will drive our discussions forward. Don't hesitate to jump into the comment section, share your perspectives, and connect with fellow tech aficionados.
With great excitement, I invite you to journey with me through the digital maze, the electronic wonderland, and the data-driven universe that defines our age. Together, we'll decode complexities, celebrate achievements, and ponder the limitless possibilities that lie ahead.
As we dive into the sea of 1s and 0s, remember that innovation knows no bounds, and at InnovateHub TechTalk, we're poised to explore it all.
Welcome aboard, tech voyagers!
Lucas Redford
Founder and Chief Explorer, InnovateHub TechTalk
#Technology Trends#Innovation Insights#Tech Enthusiasts#Digital Exploration#Future of Tech#Coding Tips#Emerging Technologies#Tech Conversations#User Experience Design#Digital Transformation#Artificial Intelligence#Internet of Things#Cybersecurity#Software Development#Gadgets and Devices#Web Technology#Virtual Reality#Blockchain#Tech News Updates#Data Privacy#Cloud Computing#Tech Industry#Online Innovation#Science and Technology#Technology Community#Tech Insights#Cutting-Edge Tech#Digital Evolution#Innovation Spotlight#Technology Exploration
2 notes
·
View notes
Text
Why HTML Matters in Coding: The Foundation of Every Website
When you open any website—whether it’s a social media platform, a blog, or an e-commerce store—you’re looking at something built on HTML. Yet many new coders underestimate its importance because it seems "basic." But the truth is, HTML (HyperText Markup Language) is the unsung hero of the digital world.
Let’s break down why HTML is essential in coding and how it serves as the starting point of every web development journey.
🔹 What is HTML?
HTML stands for HyperText Markup Language. It’s the code that gives structure to a webpage. While it doesn’t control how things look (that’s CSS) or behave (that’s JavaScript), HTML defines what is on the page—text, images, buttons, forms, links, and more.
Think of HTML as the skeleton of a webpage. Just as a building needs a framework before you decorate it, a website needs HTML before it can become beautiful or interactive.
youtube
🔹 HTML in Action
Imagine opening a simple webpage. You see a title, some text, a few images, and maybe a button. Behind the scenes, each of those elements is written in HTML. Here's what that might look like:
htmlCopy
Edit
<h1>Welcome to My Website</h1> <p>This is a paragraph of text.</p> <img src="image.jpg" alt="A beautiful landscape"> <a href="contact.html">Contact Us</a>
Each HTML tag tells the browser how to display the content. It's clear, readable, and essential.
🔹 Why HTML Is Non-Negotiable for Developers
Without HTML:
There’s no structure or layout to the page.
Content would appear as a raw, unorganized mess.
Search engines wouldn't know how to index your site.
Accessibility tools couldn't interpret content for users with disabilities.
In short: No HTML = No Web.
🔹 HTML Comes First
Before learning flashy animations with JavaScript or crafting pixel-perfect styles with CSS, you need to understand how a webpage is built—and that starts with HTML. It’s the foundation upon which everything else is layered.
Whether you're aiming to become a full-stack developer, UI/UX designer, or SEO expert—HTML is your starting block.
🔹 Beyond Coding: HTML Helps SEO and Accessibility
HTML doesn’t just help your content appear—it helps it be found and understood. Proper use of tags like <title>, <meta>, <h1>, and <alt> contribute to:
Better search engine optimization (SEO)
Enhanced accessibility for screen readers
Clean, semantic code that's easier to maintain
🔹 Ready to Start?
If you’re excited to build your first website or looking to understand how the web really works, HTML is your first step. It’s not just "beginner code"—it’s the language of the web.
🚀 Final Words
Want to create amazing websites? Start with HTML. It’s simple, powerful, and absolutely necessary. Learn HTML and unlock your power to build the web.
1 note
·
View note
Text
Convert HTML to Image: A Step-by-Step Guide ✨
Do you want to turn some HTML code you've made that's on your website and have a way to convert it into an image for you to save?
Well, look no further! I too wanted to do the same thing but funny enough, there weren't any straightforward tutorials out there that could show you how! After hours of searching, I finally discovered the solution~!
This is an old tutorial I made 🐼
💛 Set your environment
Before we dive into the conversion process, I'll assume you already have your HTML code ready. What you want to learn is how to turn it into an image file. You should have a good grasp of HTML and JavaScript. For this tutorial, we'll use the following HTML code example:
We won't include the CSS code, as it doesn't affect this tutorial. The JavaScript file (script.js) at the bottom of the body element is where we'll add the functionality for the conversion.
Your page should resemble the following:
As you can see, the "Click me" button will handle the conversion. We aim to convert everything within the div.info-div into an image.
💛 Using the html2canvas JavaScript Library
The html2canvas library allows you to take screenshots of webpages and target specific elements on a screen. Here are the steps to include the library in your project:
The steps to put the library in your project:
Visit the html2canvas website for more information.
Copy the CDN link from here
and include it in a script tag in your project's head tag in the HTML file:
That's it for including the library on the HTML side. Now, let's move on to the JavaScript code.
💛 JavaScript Functionality
Here's the JavaScript code to handle the conversion:
In this code, I want to turn the whole div.info-div into an image, I put it into a variable in const div = document.querySelector(".info-div");.
I also put the button into a variable in const button = document.querySelector("button");
I added a click event listener to the button so when the user clicks the button, it will follow the code inside of the event listener!
You can find similar code like this in the documentation of the html2canvas library:
What is happening here is:
We add the div (or what the element we want to take an image of) into the html2canvas([element]).then((canvas)
Added the image file type url to a variable = const imageDataURL = canvas.toDataURL("image/png"); - You can replace the png to other image file types such as jpg, jpeg etc
Created an anchor/link tag, added the href attribute to imageDataURL
The download attribute is where we will give the default name to the image file, I added "dog.png"
Perform the click() function to the anchor tag so it starts to download the image we created
And that's it!
💛 The End
And that's it! You've successfully learned how to turn your HTML into an image. It's a great way to save and share your web content in a unique format.
If you have any questions or need further clarification, please comfortable to ask. Enjoy converting your HTML into images! 💖🐼
#my resources#coding#codeblr#programming#progblr#studying#studyblr#programmer#html#html css#javascript#neocities#coding tips#html5 tutorial#html tutorial
155 notes
·
View notes
Text
В одиночестве среди шума,
Звучит lo-fi в тишине вечерней.
Ambient музыка в душе румяней,
Погружает в мир своих глубин.
Что связует вас с более высоким?
Самосохранение, либо служение?
Слушая lo-fi, дай ответ внутренний,
Чем наполнен твой внутренний творение?
Какие музыкальные вибрации
Отражают нашу внутреннюю суть?
Самопознание в этих медитациях,
Создаёт ли мелодия нашу судьбу?
И в исследовании себя спроси,
Каким мир создаёшь ты вокруг?
Где твои мысли, в чём их фокус?
Ответ твой — ключ к истине в пути.
Что ты строишь своим дыханьем,
Ловишь ли вдохновение в звуке?
И как эта музыка в тишине
Отразит наше внутреннее рух?
Закрой глаза, просто послушай,
lo-fi музыка тебя проведёт.
В тишине ответы ты найдёшь,
На вопрос — ты кого сегодня служишь?
#artificial intelligence#Our Flag Means Death#coding tips#blues lo-fi#lo-fi aesthetic#ambient chill music#South Africa#illustration#gaming life#downtempo lo-fi vibes#chatgpt#lo-fi hip hop beats#grunge
1 note
·
View note
Text
저녁이고 조명이 어두워지고, 좋아하는 칠 트랙이 흘러나오고 있습니다. 주로 클래식한 록 리프나 잔잔한 피아노 연주곡일지도 모릅니다. 치유적인 음악이 조용히 방 안을 가득 채우면 멈추어 생각해보세요: 나를 넘는 무언가에게 묶여 있는 것은 무엇일까요? 제 자신의 목표와 생존에만 집중하고 계신가요?
이 탐구는 이타주의를 장려하거나 추상적인 이상을 강조하는 것이 아닙니다. 오히려, 심사숙고해보라는 초대입니다: 당신은 누구나 무엇에 헌신하고 계신가요? 가족, 헌신이 필요한 원인, 또는 당신을 근거로 하는 원칙에 헌신하고 계신가요? 아니면 당신은 개인적인 야망과 성공에 더 집중하고 계신가요? 이 질문에 대한 뚜렷한 시각을 얻기 위해 탐구해보는 것도 가치가 있습니다. 이것은 종교나 규범의 문제가 아닙니다 – 당신이 어디에 에너지를 집중하고 있는지를 이해하는 철학에 관한 것입니다.
늘어지고 있는, 당신의 우선순위와 삶을 어떻게 구성하느냐는, 음악을 선택하는 것을 포함하여 모든 것에 영향을 미칩니다. 마음이 방어적이
ChillBeats의 최신 로파이 음악 바이브와 내성적인 생각
#coding tips#Percy Jackson#tech trends#indie#tumblr feed#Supernatural#lo-fi study playlist#machine learning#Doctor Who#art inspiration#lo-fi instrumental
0 notes
Text
Dans la lueur tamisée, les notes de lo-fi music s'étirent, caressent l'âme en douceur. Entre solitude et réflexion, les chill beats résonnent, invitant à l'introspection. Quel lien nous unit à l'au-delà de nous-même, dans ce monde de downtempo music et d'ambient vibes apaisantes?
Entre lo-fi hip hop et chillhop, se dessine la question : Qui ou quoi servons-nous réellement, parmi les lo-fi beats et les blues lo-fi? Nos actions sont-elles dédiées à un idéal, une cause, ou simplement à nos ambitions personnelles dans cette ambiance de lo-fi instrumental?
Alors, dans ce tableau de lo-fi coffee shop music et de lo-fi study playlist, demandons-nous : Que construisons-nous avec nos choix, nos pensées, nos vies? Quelle mélodie guide nos pas vers demain, dans un monde de chill lo-fi vibes et d'ambient lo-fi playlist? Quelle direction prend notre existence, bercée par les notes de lo-fi music for relaxation?
Et vous, dans le doux murmure des lo-fi beats, quelle trace souhaitez-vous laisser sur le monde?
Dernières vibes de musique lo-fi et pensées introspectives de ChillBeats
#deep learning#fandom#downtempo music#Palestine#fashion#tumblr#home decor#relaxing lo-fi#Super Who Lock#Doctor Who#lofi relaxation music#coding tips#minimal style#lofi chill music#South Africa
1 note
·
View note
Text

A poetic reflection on the healing power of lo-fi beats and downtempo melodies. Imagine sinking into a well-worn chair, enveloped in the soothing currents of lofi blues and chill vibes. Let the music synchronize with your heartbeat, offering a moment of respite from life’s chaos. How does music help you find peace in the midst of a busy world?
The Infinite Now: A Downtempo Drift Through Lo-Fi Blues
#ai art#art#ai#illustrations#thoughts#Golden Globes#chillhop beats#tech trends#pop culture#fyp#lo-fi instrumental#coding tips
0 notes
Text
Wanneer de avond valt en de lichten gedimd zijn, speelt jouw favoriete chill track—misschien een klassieke rockriff of een betoverend instrumentaal. Laat de ambient muziek met helende tonen zachtjes de ruimte vullen en vraag je af: Wat verbindt jou met iets groters dan jezelf? Ben je voornamelijk gericht op je eigen doelen en overleving? Onderzoek dit terwijl je luistert naar de muziek van de avond en vraag je af: Wat ben ik aan het bouwen met mijn tijd, mijn inspanningen, mijn leven? Is het iets transcendent—een nalatenschap, een waarheid, een gemeenschap? Of is het een persoonlijke reis, een zoektocht naar betekenis? Hoe beïnvloedt deze keuze je gevoelens, acties en zelfs je luistergewoonten? Laat deze vragen door je heen stromen terwijl je je nestelt in de rustgevende vibes van lo-fi muziek. Wat creëert jouw focus? 🎶✨
#digital art#coding tips#artificial intelligence#indie#lo-fi coffee shop music#ambient chill music#South Africa#gaming life#chill downtempo music#pet love#virtual reality#illustration#Our Flag Means Death#diy projects
0 notes