
Recent Discussions
Make Your Advice Generator Unbreakable: The Power of Exception Handling
Hey, Africoders! Remember the awesome advice generator app I built last semester (https://advicegenapp-by-blessedtechie.netlify.app/)? It was a great project to explore APIs and their functionalities. But what happens when things go wrong with the API or other parts of the application? That's where exception handling comes in!In this post, we'll delve into exception handling, a crucial concept I learned in my OOP course. It's like a safety net for your code, ensuring it doesn't crash due to unexpected errors. We'll see how to implement it in our project to make it more robust and user-friendly...
Change the tag link from /t to /tag
Open the vendor Recompile the js module\\\\
do a global search for /t/ and replace with /tag/
Resolving Issue With Pusher Not Notifying Promptly
How to patch pusher not dispatching messages to users in flarum setup:Manually patch this:vendor\\flarum\\pusher\\js\\src\\forum\\index.tsxapp.pusher.then((binding: PusherBinding) => {```const channels = binding.channels;if (channels.user) {channels.user.bind('notification', () => {if (app.session.user) {app.session.user.pushAttributes({//unreadNotificationCount: app.session.user.unreadNotificationCount() ?? 0 + 1,unreadNotificationCount: (app.session.user.unreadNotificationCount() ?? 0) + 1,//newNotificationCount: app.session.user.newNotificationCount() ?? 0 + 1,newNotificationCount:...
Fun Fact Friday: "Hello, World!" Origins 🌍
Hello Africoders! 🌍Welcome to Fun Fact Friday! Today, we will be talking about the origins of the iconic "Hello, World!" program. Whether you're a senior engineer or just starting out, you've probably encountered this classic first step in programming. But have you ever wondered where it all began?#### The Origin Story 📜The phrase "Hello, World!" was first used by Brian Kernighan in 1972. Kernighan, one of the pioneers of computer science, introduced it in the book "A Tutorial Introduction to the Language B." Later, it became widely popularized in the seminal book "The C Progra...
JavaScript and TypeScript: Why Developers Are Making the Switch
JavaScript (JS) has long been the king of web development. But in recent years, TypeScript (TS) has emerged as a powerful contender. While both languages share similar syntax, TypeScript offers some key advantages that are leading many developers to make the switch.**Statically Typed vs. Dynamically Typed**The biggest difference lies in typing. JavaScript is dynamically typed, meaning variables don't have a pre-defined data type (number, string, etc.). This flexibility can be handy, but it also means errors often go unnoticed until runtime, leading to frustrating debugging sessions.TypeScript,...
CS Degree vs. Coding Bootcamp: Which Path Leads to Software Engineering Glory?
The software engineering landscape is exploding, and aspiring developers are scrambling to equip themselves with the in-demand skills to join the party. But with two main entry points - the traditional 4-year computer science (CS) degree and the intensive 6-month coding bootcamp - the decision can be a real brain teaser. There's no easy answer, as the "better" path depends on your goals, learning style, and resources.This post aims to shed light on both paths by hearing from software engineers who've taken each route. Let's get this rumble started!**CS Degree Champs:*** What did you find most...
📅 7 Days Code Challenge: Build a To-Do App 📝
Hello Africoders! 🌍Let me introduce you to the 7 Days Code Challenge, which we'll be doing every Thursday. In this challenge, a preferred language will be provided, but you're allowed to choose a language of your own.Today we'll be creating a To-Do List App and the preferred language is React.This is the daily breakdown:Day 1: Set up the project and create the basic structure.Day 2: Implement the UI for adding and displaying tasks.Day 3: Add functionality to mark tasks as complete.Day 4: Implement task editing and deletion.Day 5: Add local storage to save tasks.Day 6: Style the applica...
Debugging for Newbies: Slay those Bugs!
So, your code isn't working quite as expected. Don't fret, errors (or "bugs" in programmer lingo) are a natural part of the development process. But fear not, fellow beginner, for with a strategic approach, you can debug your code better! Here's a step-by-step guide to help you identify and fix those pesky bugs:**Always check your console:**One thing I learnt from working with senior developers is whenever I go to them to help me debug a code, they always say "let me see your console" first. And more often than not, I eventually see the error in my console and sometimes the source of the error...
Highest Scoring Word
Given a string of words, you need to find the highest scoring word.Each letter of a word scores points according to its position in the alphabet: `a = 1, b = 2, c = 3` etc.For example, the score of `abad` is `8` (1 + 2 + 1 + 4).You need to return the highest scoring word as a string.If two words score the same, return the word that appears earliest in the original string.All letters will be lowercase and all inputs will be valid.
Balancing Code and Life - How Do You Do it ? 🧘💻
Hello Africoders! 🌍,How do you balance your coding passion with your everyday life? Coding can be incredibly rewarding but also time-consuming. We all know the thrill of cracking a tough problem or launching a new feature, but how do you make sure you’re not coding around the clock and missing out on life?**Questions to Ponder**1\. Time Management:How do you juggle coding projects, work responsibilities, and personal life? Do you have a schedule, or do you go with the flow?2\. Taking Breaks:What’s your favorite way to unwind and step away from the screen? Whether it’s a quick walk, pla...
Highest Scoring Word
Given a string of words, you need to find the highest scoring word.Each letter of a word scores points according to its position in the alphabet: `a = 1, b = 2, c = 3` etc.For example, the score of `abad` is `8` (1 + 2 + 1 + 4).You need to return the highest scoring word as a string.If two words score the same, return the word that appears earliest in the original string.All letters will be lowercase and all inputs will be valid.
Don't Let Your Code Crash: Mastering the Art of Exception Handling
Exception handling is a programming paradigm that empowers you to gracefully manage unexpected situations that can arise during program execution. It acts as a safety net, preventing your code from crashing and ensuring a more user-friendly experience.Imagine you’re building an application that reads data from a file. Without exception handling, if the file is corrupt or inaccessible, your program would likely grind to a halt, leaving the user frustrated. Exception handling allows you to anticipate such errors and provide meaningful recovery mechanisms.### **Benefits of Exception Handling:***...
Africoders Community Guidelines
# ***Welcome to the Africoders Community!***... And thanks for joining us! We're excited about Africoders, and are always happy to meet people who feel the same way. We want *everyone* to get the most out of Africoders and the Africoders community, so we ask that you please read and follow these guidelines. And enjoy your visit here!### **Looking for Technies?**You've come to the right place! We're always busy working hard to make Africoders better, so there are limits to the help we can provide. Specifically:* Most technies visit the board and drop discussions from time to time* If you have q...
Question and Tech Tip of the Day:
What’s Your Version Control Strategy? 🧐Hello Africoders! 🌍**Question of the Day:** What’s your version control strategy? Do you rely on Git, SVN, or another system to manage your code? Share your experiences and tips below!**Tech Tip of the Day:** If you're not already using Git for version control, here’s why you should consider it:1. **Branching and Merging:** Git makes it easy to create branches for new features, bug fixes, or experiments. Once you’re done, you can merge them back into the main branch seamlessly.2. **History Tracking:** Every change you make is logged with a...
How To Embed Youtube Videos On Africoders
To embed youtube video, believe it or not, you just paste the link of the video into your post as shown in the image:
React Tutorial For Beginners [Youtube]
You can watch this react tutorial for beginners:
This is highly recommended for beginners starting react
Highest Scoring Word
Given a string of words, you need to find the highest scoring word. Each letter of a word scores points according to its position in the alphabet: a = 1, b = 2, c = 3 etc. For example, the score of abad is 8 (1 + 2 + 1 + 4). You need to return the highest scoring word as a string. If two words score the same, return the word that appears earliest in the original string. All letters will be lowercase and all inputs will be valid.
The code whisperer who feels like a fake
You write code that solves a problem with efficiency. Yet, a nagging voice whispers:"Did I just get lucky?" Welcome to the world of imposter syndrome, a common affliction among programmers, even the best ones.Imposter syndrome is the condition of feeling anxious and not experiencing success internally, despite being high-performing in external, objective ways. This condition often results in people feeling like "a fraud" or "a phony" and doubting their abilities.Despite your skills and accomplishments, the fear of being exposed as a fraud lingers. Why? The tech world is a constant learning sp...
Vowel Count
Return the number (count) of vowels in the given string. We will consider a, e, i, o, u as vowels for this Kata (but not y). The input string will only consist of lower case letters and/or spaces.
Does my number look big in this?
A Narcissistic Number (or Armstrong Number) is a positive number which is the sum of its own digits, each raised to the power of the number of digits in a given base. In this Kata, we will restrict ourselves to decimal (base 10).For example, take 153 (3 digits), which is narcissistic:` 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153`and 1652 (4 digits), which isn't:````1^4 + 6^4 + 5^4 + 2^4 = 1 + 1296 + 625 + 16 = 1938````The Challenge:Your code must return true or false (not 'true' and 'false') depending upon whether the given number is a Narcissistic number in base 10.This may be True and False in your...