fbpx
Home Blog Page 768

Word of the Day: dhow

0
Word of the Day: dhow

The word dhow has appeared in three articles on NYTimes.com in the past year, including on Oct. 5 in “U.S. Sent Munitions Seized From Iran to Ukraine” by Eric Schmitt:

The U.S. military’s Central Command said in a statement on Wednesday that earlier this week it had transferred about 1.1 million rounds for Soviet-era machine guns and rifles seized from Iran to Ukraine’s armed forces.

Allied naval forces seized the munitions in December, according to the statement, from a “stateless dhow” — essentially an unregistered wind-powered vessel — sailing to Yemen. Iran’s Islamic Revolutionary Guards Corps was sending the munitions to Houthi rebels in Yemen in violation of a United Nations Security Council resolution barring such transfers, the statement said.

Can you correctly use the word dhow in a sentence?

Based on the definition and example provided, write a sentence using today’s Word of the Day and share it as a comment on this article. It is most important that your sentence makes sense and demonstrates that you understand the word’s definition, but we also encourage you to be creative and have fun.

If you want a better idea of how dhow can be used in a sentence, read these usage examples on Vocabulary.com. You can also visit this guide to learn how to use IPA symbols to show how different words are pronounced.

If you enjoy this daily challenge, try our vocabulary quizzes.


Students ages 13 and older in the United States and the United Kingdom, and 16 and older elsewhere, can comment. All comments are moderated by the Learning Network staff.

The Word of the Day is provided by Vocabulary.com. Learn more and see usage examples across a range of subjects in the Vocabulary.com Dictionary. See every Word of the Day in this column.

Forecasts for 2024 – Learning Tech and Systems

0
Forecasts for 2024 – Learning Tech and Systems
  • Amazon Bedrock – It’s a model as a service – already has several LLMs available - I will either be using Bedrock for FindAnLMS (yes, generative ai is coming to my platform, and FindContent.io – which re-launches in Feb) or direct with AmazonQ. One vendor is using Amazon Bedrock – i.e. a learning system vendor.
  • AmazonQ – Just launched for business – legit threat and competitor to ChatGPT, as in GPT-4 and even 4.5 - Definitely worth a check it out - Pricing from a business standpoint (i.e. for your company) is a bit funky. 
  • Anthropic – Claude and Claude Pro – Already one vendor in the content space uses Claude – they love it
  • Stability AI – It has vastly improved since the initial first release. CYPHER LEARNING (they prefer their name in CAPS) uses them along with OpenAI’s GPT-4.
  • Google Cloud – I’d recommend going with their Model as a service, which enables you to pick from a significant number of LLMs – you have to use Vertex AI as the base – it’s machine learning. They call their model as a service – modal.
  • Lama 2- A well-known learning system vendor is using them – they like it. Personally, I’m leery of anything Meta rolls out. Yeah, it’s free, but this is Meta. Llama 3 which is in the works is expected to be a legit competitor against OpenAI ChatGPT.  
  • A21 Studio – Jurassic-2 - it’s a text-based gen ai
  • Microsoft Phi-2 – An LLM that can run on a mobile device or even a laptop. Similar LLMs are referred to as small LLLMs – Offers quite a number of parameters.
  • Mistral 8x7B – Open source LLM, that reportedly in performance benchmarks scored higher than Llama-2 and ChatGPT 3.5 - Numerous folks note that Mistral is a Unicorn. 
  • Google Gemini – Initially big fan, lots of potential, but the initial release is underwhelming – it is now the foundation for Bard
  • Ernie Bot – From Baidu – Reportedly outperforms GPT 4. Another one is Wenxin. But Ernie Bot is the player here. The downside, unless you can read Chinese, you will be out of luck. It does have some English, but it was trained on Chinese text.
  • Falcon 180B (from Tii) – 180 billion parameters, and 3.5 million tokens. Open-source model. Falcon is in Bedrock – just an fyi.
  • Content creator tool (they may call it a course builder or authoring tool) – it is already the most popular of the rollouts in 2023. From what I hear, a lot of vendors are eyeing this as the feature to use with gen ai. It will dominate. Fun fact though – with the exception of one vendor, everyone else is publishing text only. Some offer a WYSWIG window, where you can add video, audio, YouTube links kind of stuff. Boring IMO. The vendor who has done well with it, offers layers, synthetics such as video and audio. Synthetic means it’s ai created. Oh, with the content creator, it will generate chapters or modules (depending on your terminology), content – text and so forth. You can do it via questions (one example depending on the vendor) or by typing in a specific skill or wordage. 
  • Assessment tool – Number two on the hit list. So far, I have been underwhelmed here.
  • Skills – Yep, the gen ai will generate the skills you need – and the strength or weakness. It has a lot of potential, but I think a lot of vendors will miss out on this. If you can tie it to content and ensure that it is accurate, it could go well
  • Creates a learning path or learning journey – I’ve seen a couple of vendors do this. Again, it is text driven – and in one case, you have to add the assets, rather than the gen ai being able to do it. 
  • With the above skills, I’ve already seen via a recruiting module whereas it pulls the information from a resume uploaded. But is that really learning? Not in my opinion
  • AI coaching or mentoring – The key here is that you should have a human coach following the AI results. An AI coach though, is possible and in one research study they found that an AI coach was just as effective if not better than a human – however it is totally based on what is the topic and questions around it.

How I Went from English Teacher to Developer Advocate in Less Than 1 Year

0
How I Went from English Teacher to Developer Advocate in Less Than 1 Year

Learning to code so that you can land a job in tech can feel daunting. That’s why we’re sharing inspiring stories from Codecademy’s community — to show how people like you (yes, you!) can embark on a learning journey and end up with a totally new career. We hope these stories serve as a reminder that there’s no single path to a more fulfilling work life.

Today’s story is from Pj Metz, a 38-year-old Developer Community Manager at ProjectDiscovery, an open-source security startup, living in San Mateo, California. Read more stories from Codecademy learners here — and be sure to share your story here.

Why I chose to learn to code

“I was a high school English teacher for 11 years. I loved it, and it had its challenges, of course. Number one being teaching in Florida doesn’t pay. The pandemic hit at the beginning of the last quarter of school, and my friends got together on Zoom and did these happy hours. I had a friend who worked at Red Hat who told the group he found out he was being underpaid by $50,000 a year. I remember being really shocked because my base salary was less than that.

Another friend said privately, ‘Pj, I do this job called Developer Relations or DevRel and essentially, I teach people how to use products. I think you’d probably be really good at it.’ And I said, ‘Well, I don’t know how to code. I write poetry and I teach Shakespeare — that’s what I’m good at.’

He said, ‘What are you up to this summer?’ And I go, ‘Nothing, I’m wiping down groceries and being afraid to talk to people.’ He sent me this video by Scott Hanselman about C#. I watched it and took notes while I was reading it, and then I found the rest of the 14 videos in the series.

A couple of weeks later, I went back to my friend, and I was like, ‘Hey, what else do you have? I watched all the videos already.’ And he goes, ‘Oh, I don’t know.’ So we set up a plan, I started researching, and that’s when I found Codecademy.”

How I made time to learn

“My friend Brandon said, ‘You should stream yourself. Then you’ll have this repository of information and learning that you’ve done live on Twitch, and other people will come and help you, too.’ The plan became: I spent about four to five hours a day on Codecademy learning some C#. On Sundays, I would stream with Brandon building a website.

Pj and his friend Brandon started live-streaming their Codecademy learning journey on Twitch.

When the school year started, my schedule was packed because I was teaching AP for the first time, I was the Drumline Instructor for the marching band, and still trying to code. Sundays we were still streaming, but during the school week I could only do Codecademy at lunch.”

How I saved up money to switch careers

“My wife and I were teachers, so we had to be very careful with money. When I looked at Codecademy, I was like, Well, I could do a bootcamp and it’s $12,000. I could find courses at my community college and pay for those. But I’ve got nothing to do this summer. I just decided to buy Codecademy Pro, because it was 40 bucks a month at the time.”

Are you choosing between a bootcamp intensive and Codecademy?

Codecademy Pro helps you gain job-ready skills at a fraction of the cost. Learn more here.

How long it took me to land a job

“At first, I didn’t know if a career change was actually possible, but I knew that if I kept working at it, something fun would happen. Brandon introduced me to someone named Chloe Condon who worked at Microsoft as a Developer Advocate. She and I started hanging out on streams too. We started making Twitter bots together, and that’s when I started learning JavaScript.

Around November, I get the idea to make this a career change. I decided that this will be my last year teaching, and at the end of this school year, I’ll start getting a job. Chloe and I started streaming a show called The Show Must Go Off the Air. The whole point was we wanted to get the show canceled by getting me a job. The show was literally us just hanging out, and she would walk me through job applications.

In late February, someone from a fintech company reached out to me, saying they were hiring for their first Developer Relations role. I go through the process, and I get an offer, and I sign it on a Saturday, and on Monday, I put in my two weeks at school. I didn’t expect to leave in the middle of the school year, but for the money they were offering, I was like, ‘Okay, absolutely.’

Monday night, the company emails me and tells me that they’re rescinding the offer. They just said, ‘We’re no longer going to have this role.’

I’m like, ‘What am I going to do?’ I can’t just go start working at another school out of nowhere. I was thinking maybe I could pick up substitute teaching somewhere. But are they going to want someone who quit their last teaching job for apparently no reason? I remember looking at my wife saying, ‘I have two months and we breakeven on money.’ I took the weekend to get myself together and I started making a plan.”

How I got in the door

“My mentor Chloe was helping me make a plan as well, she’s like, ‘Recruiters are in my inbox all the time. I’m just going to pass them to you.’ I keep working on web development, taking whatever courses I can find on Codecademy. I took a technical writing course, and just did anything I could to make myself marketable.

Now I have a list of people to reach out to from Chloe. My day was spent messaging people on Twitter: ‘Hi, I’m Chloe’s mentee. I heard that you might be interested in chatting with me. Here’s what I’m working on. I’m trying to build a portfolio.’ I’m trying to show off my GitHub and be like, ‘Look, these are Codecademy exercises that I imported into GitHub. I know what I’m doing.’

About a month into it, I literally picked up an application to Dunkin Donuts near my house because I was about to start needing money immediately. That same day, GitLab reaches out and says, ‘We’re hiring a position that we’re calling Education Evangelist. Essentially, you’d be a part of our DevRel team, but you would be focused on students and teachers.’”

How I nailed the interview

“I couldn’t contain myself. I told the recruiter, ‘This is going to sound cocky, but this job is written for me. I’m who you’re looking for.’ And I got it.

I was able to point to specific skills they were looking for from the job application and show specific ways I had accomplished those tasks and could prove those skills.”

If you’re learning something new and you’re not confused by it, you didn’t learn anything new.

Pj Metz

Developer Community Manager at ProjectDiscovery

How day one and beyond went

“There was a big adjustment, because when I was a teacher, my life was dictated by bells, and I just did the same thing on repeat. Now it was like, here’s your eight-hour day; what I spend it on is my choice.

From then on, it was learning GitLab. I didn’t have to write any code for my job, but I needed to know how to read a lot of it. We write things in YAML, and we do a lot of static websites. I needed to brush up on HTML again and make sure I’m familiar with that. Anytime I had something new to do, I said, ‘What does Codecademy have in its catalog that could help me here?’”

What I wish I knew before I started learning

“I wish I knew that failure isn’t an end, it’s a step. It feels so bad to not understand. I remember the section on C# methods. I stumbled through it; I was clicking hints and ‘View solution’ all the time. I remember getting to the end of it and just feeling like I don’t actually understand methods at all. A month later, I went to do it again. I erased my progress, went back, and did it one more time. That’s when it started to click.

If you’re learning something new and you’re not confused by it, you didn’t learn anything new. You already knew it. So you have to embrace that confusion. At first, I was like, ‘I don’t get this. What if I never get it?’ You will — it’s just going to take time.”

Not sure where to start? Check out our personality quiz! We’ll help you find the best programming language to learn based on your strengths and interests.

Want to share your Codecademy learner story? Drop us a line here. And don’t forget to join the discussions in our community.

What Do You Want to Do Differently in the New Year?

0
What Do You Want to Do Differently in the New Year?

Has the New Year inspired you to make any changes to your habits and routines? If so, what are your plans and what do you hope to accomplish? Are the changes meant to improve your life? Do you think other people will be affected positively by your resolutions?

In the Opinion essay “This Year, Make a Resolution About Something Bigger Than Yourself,” Roger Rosenblatt writes about what the new year means, and the opportunity it presents to think about how we use our time. He writes:

We reflect on the years we’ve lived, on the past resolutions made and broken. Another New Year’s Eve come and gone. Every time the ball drops, the heart sinks. You are running out of time, and time is what we value most.

The historian-philosopher Lewis Mumford believed that the clock, not the steam engine, was the principal machine of the industrial age because time has a commanding relationship to the expenditure of human energy, and thus to any product itself. From the start, the essence of industry has been that things run on time. Time touches everything in life, even love. The fundamental things apply.

Thus there is always a melancholic desperation and urgency when we shout, “Happy New Year!” Will this new year, in fact, be any better than the last? We resolve that it will. We resolve to be fitter, healthier, cleverer, richer, more successful, more popular, more productive, better dressed, happier. And so restarts the whole vain, foolish, inevitably disappointing cycle.

The trouble with all such self-oriented promises is that they deal in chicken feed. What does the great wide world care if you lose weight, or work out, or work harder, or quit drinking or smoking?

Quit smoking or smoke three packs a day. Work out daily or let yourself go. It’s your choice, your life. Your little life. Meanwhile, the world — the whole tortured, self-destructive, polarized, endangered, extraordinary world — spins on.

What if, instead of planning our exercise regimens, we focused our intentions on all that is undesirable in human activity — wars, bigotry, brutality, the despoiling of the earth — and sought to address it? What if instead of making a milquetoast resolution, we made airtight commitments?

He also suggests that in trying to make the world a better place, we start small:

The task of improving the world may seem impossible, but it isn’t. All it takes is the proper sequence of correct discrete decisions. Decisions are just resolutions with teeth.

An editor of mine told me a story from his childhood on his grandparents’ farm in Iowa. The little boy, looking out over acres and acres of corn, asked his grandfather, “How are we going to shuck all that corn?” His grandfather said, “One row at a time.”

This, too, is how to improve the world. And we can start small.

Personally, I vow that I will frequently visit a children’s hospital and try to distract kids with stories, the funnier the better. I vow that I will phone every lonely person I know — and there are plenty — at least twice a week, just to chat and make them feel part of the living world. I vow to give alms to everyone who asks, and to those who don’t, and to stand up for the stupid and crazy, the stupider and crazier, the better. I promise to keep an eye out for strays (cats, dogs and people) and bring them safety and comfort. I vow to see every wrong as a menace, every wound an opportunity.

What will you do — right now, this week, this month — to make a better world? Stage a protest. Send a letter to right a wrong, or to proffer friendship. (A thoughtful, sympathetic letter to a friend in sorrow or distress is a powerful thing.) Lend a hand. Offer a word of comfort or inspiration or support or love. Donate money or, most valuable of all, time. There are so many ways to move this world, right within reach.

Students, read the entire essay and then tell us:

  • What experiences have you had with New Year’s resolutions? Have you ever made any that led to lasting changes in your habits? Have you ever given up on a resolution?

  • How do you feel after reading Mr. Rosenblatt’s essay? Do you agree that the most worthwhile resolutions are the ones that aim to improve the world and not just ourselves? Why, or why not?

  • Mr. Rosenblatt writes, “Time touches everything in life, even love.” What does that mean to you? How is this statement relevant to his argument that a new year is a good time to establish the practice of trying to improve our world?

  • You read about the farmer who said to shuck acres and acres of corn by doing it “one row at a time.” Does this remind you of a time when you had to do something difficult or time consuming? Can you apply this advice to anything in your life, like a school project or college applications?

  • What is one action you can take right now that has the potential to benefit another person or perhaps a whole group? What will it take to make that happen? Do you need anyone else’s help? How will you take the first step?


Students 13 and older in the United States and Britain, and 16 and older elsewhere, are invited to comment. All comments are moderated by the Learning Network staff, but please keep in mind that once your comment is accepted, it will be made public and may appear in print.

Find more Student Opinion questions here. Teachers, check out this guide to learn how you can incorporate these prompts into your classroom.

Word of the Day: assiduous

0
Word of the Day: assiduous

The word assiduous has appeared in 14 articles on NYTimes.com in the past year, including on Oct. 23 in the Opinion essay “If Everyone Gets an A, No One Gets an A” by Tim Donahue:

How might grade inflation’s roiling cloud now be pierced? Do we approach the colleges that purport to favor both mental health and kids who take 10 A.P. exams? Or high schools, which watch these grading trend lines with the dread of sea level rise? We keep treating high school and college as two separate entities, but ultimately, they service the same people, and there needs to be more conversation about what this mess of grades is doing to them.

For now, a modest proposal: Consider the essay that comes in with a promising central idea but lacks support from a few critical moments of the text. It makes a smart but abrupt transition and closes with an interesting connection, a trifle undercooked. With another assiduous go-round, it might become something amazing. But please don’t give this draft an A-minus, the grade that puts so much potential to an early, convenient death. Instead, think of the produce of this student’s deletions and insertions, the music as he riffles through those pages he’ll annotate better next time, the reflective potential of a revision. Grading offers a singular place to teach such lessons of resilience. Instead, consider the B-plus.

Can you correctly use the word assiduous in a sentence?

Based on the definition and example provided, write a sentence using today’s Word of the Day and share it as a comment on this article. It is most important that your sentence makes sense and demonstrates that you understand the word’s definition, but we also encourage you to be creative and have fun.

If you want a better idea of how assiduous can be used in a sentence, read these usage examples on Vocabulary.com. You can also visit this guide to learn how to use IPA symbols to show how different words are pronounced.

If you enjoy this daily challenge, try our vocabulary quizzes.


Students ages 13 and older in the United States and the United Kingdom, and 16 and older elsewhere, can comment. All comments are moderated by the Learning Network staff.

The Word of the Day is provided by Vocabulary.com. Learn more and see usage examples across a range of subjects in the Vocabulary.com Dictionary. See every Word of the Day in this column.

Free January 2024 Wallpaper & Instagram quote

0
Free January 2024 Wallpaper & Instagram quote

Free January 2024 Wallpaper & Instagram quote

Free January 2024 wallpaper is here!

I’m so excited that we get to start another year together! This month’s free wallpaper is all about celebrating good times and I think you’re going to love it. Picture subtle fireworks bursting against a serene sky-blue background that’s sure to uplift your mood, with a splash of sunny yellow to make it even more delightful.

Each wallpaper download from January 2024 includes the following:

  • Desktop wallpaper x3 (plain, with the calendar, and with a quote)
  • Phone wallpaper x3 (plain, with the calendar and with a quote)
  • Tablet wallpaper
  • Instagram ready quote

January's wallpaper phone preview

Quote for January 2024

I don’t believe in waiting until January to start something new just because it’s the beginning of a new year. I think every month is equally good for giving yourself a fresh start. To be more specific, the best time for new beginnings is now – by now, I mean the current moment rather than a specific day, week, month, or year. Let this quote remind you about it every day.

the best time for new beginnings is now

P.S the square image is also included as a larger file in the download package below! Feel free to post it on your Instagram.



Looking for more? Check our previous wallpapers!

You can get three different desktop options with the free download – one with a calendar, one without the calendar, and another with a quote. Additionally, there’s a wallpaper available for tablets and three phone options too. You’ll also find an Instagram-ready square that features the weekly quote.

Free January2024 Wallpaper & Instagram quote with blue fireworks

FOR PERSONAL USE ONLY.

NOTE: This wallpaper is available as a free download through January 31, 2024 only. After that, a $5 download fee applies.


Looking for more?

Browse all wallpapers from this series.



Start a year with a new design!

Since you just got a new wallpaper, consider updating your blog’s appearance with a fresh and modern look too! There are many different blog templates available that can make your page more enjoyable to read and navigate. Take some time to browse through them and see what catches your eye.

Blogger templates

WordPress Themes


Your voice matters!

If you have your favorite quotes and would like them to appear on the next free wallpaper, make sure to post them in the comments below or send us your ideas via email.

Enjoy!

What Is Recursion in Programming? 

0
What Is Recursion in Programming? 

Knowing how to use recursion to solve a problem can be very useful when you’re writing code. Questions or coding challenges that involve recursive thinking can come up in technical interviews, because hiring managers want to see that you understand how to break down a problem into smaller sub-problems. And if you’re into competitive programming, recursion can come up pretty often as a problem-solving tool. 

Ahead, we’ll go over recursion and how it’s used, its advantages and disadvantages, and how to know when using recursion is ​a good​ way to solve a problem.

Learn something new for free

What is recursion used for? 

Recursion is breaking a component down into smaller components using the same function. This ​​function calls itself either directly or indirectly over and over until the base problem is identified and solved. For some programming problems, using recursion makes for a concise and simple solution that would be more complex using ​an​other algorithm

For a real-life example of recursion, imagine you’re ​at the front of​ a line of people at a crowded supermarket and the cashier wants to know how many people are in the line total. Each person can only ​interact with​ the person directly in front of or behind them. How would you be able to count them all? 

You could have the first person in line ask the second person in line how many people are behind them. This continues all the way until the nth person in line (in a recursive function, this would be when the base case is hit). Then, the information is passed back from the nth person to the first person. Now, the first person in line knows how many people there are and can provide that info to the cashier helping the line of people. 

This is recursion. The same function is used by each person to count, and the answer is passed on to the next person so they can use it in their calculation. ​H​ere’s how it could be written in Python:

def count_line(count):​ 
  ​if (no_one_behind(count)):​ 
    ​return count​ 
  ​elseif (no_one_in_front(count)):​ 
    ​return count_line(0)​ 
  ​else: ​ 
    ​return count_line(count + 1)​ 

The function returns itself after adding 1 to the ​​count​ until there is no one behind the current person, then it just returns the ​​count​. We can use it to illustrate some of the concepts in recursion. 

What is a base case in recursion? 

A function has to call itself at least once to be recursive, but eventually, it has to return the value you are looking for — otherwise it’s useless​ and​ will probably also result in the program crashing. In the function above, the function calls itself in two places, but it also returns the count if there is no one behind the person. 

This is the base case of this recursive function. The base case is also called the halting case, or base condition, because it’s like a stopping point or safety net that keeps the function from endlessly calling itself. It’s met when a recursive function finally returns a value, and the problem is solved. Ours is solved when there is no one left in line to ​count​. 

Direct vs. indirect recursion 

The recursive function above is an example of direct recursion because the function calls itself. Indirect recursion is when a function calls another function. Here is an example of indirect recursion:

​def indirect_function1():​ 
  ​# Execute code... ​ 
  ​indirect_function2()​ 
 
​def indirect_function2():​ 
  ​# Execute code...​ 
  ​indirect_function1()​ 

Examples of recursion 

The examples of recursion​ above​ display the concept simply, but it‘s not a real-world problem and our “code” is only pseudocode. Here are some ​examples of problems that can be solved using recursion​: 

Calculate the sum of two numbers 

This is a simple example that demonstrates recursion. FYI: This probably wouldn’t be used in production because ​it​‘s a contrived way of adding two numbers:

​def sum(x, y):​​​ 

​​​  ​​if (y == 0):​ 
    ​return x​ 
  ​if (y > 0):​ 
    ​return 1 + sum(x, y​ ​-​ ​1)​

Instead of just summing ​​x​ and ​​y​​, we subtract 1 from y and return the function again added to 1. Once ​​y​ is 0, the value of ​​x​ is returned. This function will only work with positive numbers. Here‘s how all these returns will stack up if ​​x​ is 1 and ​​y​​ is 2. Consider each set of parentheses as one function call. 

​(1 + (1 + (1)))​ 

Calculating a factorial of a number 

Now that we’ve seen ​two​ example​s​ of recursion, let’s look at a place ​where​ recursion is really useful​:​ calculating a factorial. 

In math, a factorial of a number ​​n​​ is represented by ​​n!​​ and is the product of all positive integers that are less than or equal to ​​n​. The calculation for 5 factorial is: 

​5 * 4 * 3 * 2 * 1 = 120​ 

Writing a recursive function for this is one of the easiest ways to calculate this value. Here is a Python function that will calculate a factorial: 

def recursive_factorial(n):​ 
  ​if n == 1:​ 
    ​return n​ 
  ​else:​ 
    ​return n​ ​*​ ​recursive_factorial(n​ ​-​ ​1)​ 

Here is the same function written iterative​ly​: 

​def factorial(n): ​ 
  ​fact = 1​ 
  ​for num in range(2, n + 1):​ 
    ​fact *= num​ 
  ​return fact​ 

The recursive function doesn’t save many lines of code in this example, but it represents the actual problem clearly. We are multiplying the current number by one less than the current number until we reach 1. Here’s how the returns would stack up for calculating the factorial of 5: 

​(5 * (4 * (3 * (2 * (1)))))​ 

Calculating a Fibonacci sequence 

A Fibonacci sequence is another type of calculation where recursion works well. A Fibonacci sequence is a series of numbers where each number is a sum of the two numbers before it. Here is an example: 

​0, 1, 1, 2, 3, 5, 8, 13, 21, 34

And here is a recursive function in Python to find a number in this sequence based on its location: 

​def fibonacci(n):​ 
  # Base case 
  ​if n <= 1:​ 
    ​return n​ 
  ​else:​ 
    # Recursive call 
    ​return(fibo​nacci​(n​ ​-​ ​1) + fibo​nacci​(n​ ​-​ ​2))​ 

The function calls itself twice at the end — once for the number right before the number passed in and one for two numbers before. These numbers continue to get smaller until they reach 1 and the function returns the value. Here’s how all the returns will stack up to find the number in the 2nd position. 

​((1 + 0) + (0))​ 

Advantages of recursion 

Recursion can’t be used for everything, but it does have some advantages for specific types of problems. Here are some of its advantages: 

  • It can make your code easier to write, replacing complex logic with one function. 
  • It can make your code more concise and efficient. 
  • It can reduce the amount of time it takes your solution to run. (Though it also can make it slower, as we will see in the disadvantages section.) Often, making a recursive function fast requires using memoization, which involves storing the result of each calculation so that it can be used in each recursive call instead of combining the result and the function. 
  • Recursion is efficient at traversing tree data structures. A tree is a collection of objects that are linked to one another. This type of data structure is well-suited for recursion, because the same function or operation can be applied over and over. 

Disadvantages of recursion 

Recursion also has some disadvantages. Here are a few of the most significant: 

  • Recursion uses more memory. In a computer, a function call is added to the “call stack” and stays there until it returns a value. A recursive function will call itself until ​the point when ​a value is ​finally ​returned​ when a base case is hit.​ ​A​ll of those function calls go on the stack and remain ​on the stack​​​ until that point. This eats up memory. 
  • Recursion can cause stack overflows. This happens when the call stack has no more room to hold another function call and the recursive function has not returned ​any value ​yet. 
  • Recursion can be slow if you don’t use it correctly with memoization. 
  • Recursion can be confusing. It can make your code simpler but also give you more mixed signals. Unless you ​understand​ recursion, it can be hard to grasp what a recursive function is doing. But once you know how recursion works, it can make coding simpler. 

Learn more about recursion 

​​W​hile ​recursion​ might take a little practice before it sinks in, ​there are many​ problems in code that you can solve ​by ​using it. When you ​use it successfully​, it seems like magic. Many modern programming languages support recursion. Some, like Haskell and Scheme, require coders to strictly use recursion instead of loops. 

​​I​f you want to try your hand at recursive programming, you can check out our Python, Java, JavaScript, and other programming language courses to get started. We even have Learn Recursion with Python for an in-depth introduction to recursion. There’s also our Java: Algorithms course that will teach you recursion and other important algorithms in the Java programming language.

Loved Code Review? Try These Data Science Courses Next

0
Loved Code Review? Try These Data Science Courses Next

This time of year, if you look for it, we have a sneaky feeling you’ll find that data actually is all around us — no, seriously. From your Spotify Wrapped digest to Google’s Year in Search and our very own Code Review 2023, the data in our lives tells a compelling story about the year we’re leaving behind.

End-of-year wrap-ups are fun ways that companies across industries are leveraging data to entertain and inform people. If, like us, you get giddy about stats like the number of minutes our learners spent learning Python this year (146,391,401 minutes or over 10,000 days), then there’s a pretty good chance you’ll enjoy learning about data science.

Data science is a multidisciplinary field that involves extracting insights and knowledge from data. It combines expertise from statistics, computer science, and domain-specific knowledge to analyze and interpret complex datasets. Data science is all about transforming copious amounts of information into actionable and interpretable insights.

JR Waggoner is a Data Analytics Manager at Codecademy who worked on Code Review. As he puts it: “Data engineering is sometimes very much like traditional software development. Other times, it’s the Wild West,” he says. “You’re taking this list of metrics or data points that the team has compiled and converting them into what we know from the data.”

Data scientists use various techniques, like machine learning and statistical modeling, to uncover patterns, trends, and valuable information that can inform decision-making and solve problems across diverse industries. A common thread among data scientists is a robust grasp of statistics, coding skills, and strong communication skills. Here are some data science courses, paths, and programming languages that’ll teach you techniques like the ones we used to build Code Review.

Basic data literacy

Data is really just a jumble of information until you have the knowledge to contextualize it and draw conclusions. Data literacy is a crucial skill that helps you make sense of all the data floating around — like understanding what it’s trying to tell you or whether the info is trustworthy.

Knowing how to collect data, assess its quality, use statistical thinking, and manage bias will enable you to work with data confidently and responsibly. Data literacy makes you stand out in any field where you have to make informed decisions and back up your arguments with evidence.

Learn the skills:

SQL

Our data pipeline that captures user interactions like code submissions is pretty sophisticated. For Code Review, our engineers used SQL to access information stored in our data warehouse. SQL is a programming language specifically designed for managing and manipulating data within relational databases. You don’t need to be a programmer to use SQL; its syntax is designed to be straightforward and readable, so it’s an accessible and beginner-friendly option for anyone who wants to interact with data.

Learn the skills:

Telling a story with data

Once we’d gathered all the data for Code Review, then came the fun part: figuring out what sort of stories and trends we could uncover. Communicating your data science findings in a visually pleasing and understandable way is an important part of any data scientist’s work. There are a number of data visualization tools and programming languages that you can use to create reports and dashboards.

Learn the skills:

We hope that Code Review 2023 inspires you to add some data science skills to your tech stack. If you want to work towards a career in data science, we have focused career paths that’ll help you quickly land a job you want in a variety of data science specializations. Be sure to explore the rest of our data-driven deep dive, including a guide to the most popular time to learn to code, a roundup of the top courses of 2023, and more.

Happy Creatures

0
Happy Creatures

Use your imagination to write the opening of a short story or poem inspired by this illustration, or describe a memory from your own life that this image makes you think of.

Tell us in the comments, then read the related article to learn more.


Students 13 and older in the United States and Britain, and 16 and older elsewhere, are invited to comment. All comments are moderated by the Learning Network staff, but please keep in mind that once your comment is accepted, it will be made public and may appear in print.

Find more Picture Prompts here.

Word of the Day: frankincense

0
Word of the Day: frankincense

The word frankincense has appeared in six articles on NYTimes.com in the past year, including on Nov. 17 in “In Oman, Frankincense Still Tops Gift Lists” by David Belcher:

Frankincense has a long history in gift giving, all the way back to the pharaohs of Egypt, Alexander the Great and at least one of those three wise men at the manger. Today, Muslims commonly exchange chunks of the resin at Ramadan meals breaking the daily fast, and its sweet and musky fragrance permeates many Middle Eastern homes.

By many estimations, the southwest coast of Oman offers the best frankincense on earth. The sap from the native boswellia is tapped just before the summer monsoons, which many say they believe then allows the trees to absorb and retain moisture for another year. The number of trees has been dwindling worldwide, so the Land of Frankincense, a UNESCO World Heritage Site covering about 2,100 acres in Oman, is under protection.

Can you correctly use the word frankincense in a sentence?

Based on the definition and example provided, write a sentence using today’s Word of the Day and share it as a comment on this article. It is most important that your sentence makes sense and demonstrates that you understand the word’s definition, but we also encourage you to be creative and have fun.

If you want a better idea of how frankincense can be used in a sentence, read these usage examples on Vocabulary.com. You can also visit this guide to learn how to use IPA symbols to show how different words are pronounced.

If you enjoy this daily challenge, try our vocabulary quizzes.


Students ages 13 and older in the United States and the United Kingdom, and 16 and older elsewhere, can comment. All comments are moderated by the Learning Network staff.

The Word of the Day is provided by Vocabulary.com. Learn more and see usage examples across a range of subjects in the Vocabulary.com Dictionary. See every Word of the Day in this column.