Usamos cookies propias y de terceros para mejorar la navegación y mostrar publicidad personalizada según su navegación. Si continua navegando consideramos que acepta nuestra política de cookies.
Register your Blog
( What is this? )
I Home I More views Today I Nature Videos I xxx I xxx I xxx I xxx I Register your Blog I
 

Getting Better at Ruby for #AdventOfCode2017

-
Nature News
Add to Flipboard Magazine. Fuente: The Female Perspective of Computer Science - View all news from this site
Getting Better at Ruby for #AdventOfCode2017 Getting Better at Ruby for #AdventOfCode2017

Getting Better at Ruby for #AdventOfCode2017






Because I'm a computing educator, I don't write code every day. I'd be lying if I said I didn't miss it. So when I heard about Advent of Code late 2017, I knew I wanted to participate.

In its third year, Advent of Code was created by Eric Wastl. On each day of December up to and including Christmas Day, a new problem is released at midnight Eastern time. Each registered user gets personalized input, and when you solve part one of the problem, a second, usually more difficult, part is revealed. Each part earns you a star. The faster you get your stars, the higher you are ranked. There's a global leaderboard showing the top participants.

I wasn't too interested in the competition aspect, knowing I couldn't be up at midnight every night working on code. Instead, I decided to commit to solving the problems as close to when they came out as I could for my circumstances. I also decided to use Ruby so I could remember the basics I used to know from working in Rails for half a year, and learn about the language on its own a bit more deeply.
I managed to solve almost all the problems the day they came out, with just two or three being finished the day after due to time constraints (read: two young children). I also learned a lot about Ruby, from the unexpected things you can do with hashes to its memory model, and more. My favourite trick was using a two-item array representing an x-y coordinate as a key to a hash.
More importantly, it was really really fun writing code every day. I couldn't believe how addicting it was. Most of the problems were fairly easy to solve using Ruby (sometimes it felt like it was cheating using that particular language!), though some were much trickier conceptually. None of them completely thwarted me though, and I managed to figure them all out on my own without looking online. Earning each star was very satisfying.

The code as I wrote it is now up on my Github ? no editing after the fact. I know I'm not following all the Ruby conventions (I really do prefer camel case for example), and I'm probably being more verbose than a lot of folks doing this competition (I love readable code). Now that the competition is over, you can see all the problem descriptions to understand what I'm trying to achieve. (I think you still have to solve part 1 to see the part 2 description, though.) View this post and more at The Female Perspective of Computer Science.

...
articulo visto
1
veces, esta semana
Getting Better at Ruby for #AdventOfCode2017 Getting Better at Ruby for #AdventOfCode2017

facebook: https://www.facebook.com/infonatura
twitter: https://twitter.com/en_natureworld

Source of news: The Female Perspective of Computer Science
Source of publication: 11-01-2018 16:04
visto: 1

If you liked this article you might be interested in these..

------------------------------------------------------------------------------------------------------------
Recommended Video section of our Nature Videos - Watch More Videos in Nature Videos

Rare Video: Leopard Cannibalizes Another Leopard | National Geographic

Go TO TV Nature Videos

If you liked this article you might be interested in these..


Florida Saltwater Fishing Inside Secrets



When thinking about Florida saltwater fishing, redfish is probably the first species to come to mind. Especially along the shores of the Gulf of Mexi ...
26-04-2018 16:12

Spring Bass Fishing Tips: Pre Spawn



Do you know the three phases of spring" Bass fishing during the spring can be some of the most fun and exciting times to fish during the year. T ...
26-04-2018 16:12

9 Trout Fishing Tackles You Should Not Miss to Bring Along



A fishing tackle is simply the equipment or things which are used by a fisherman or angler when going out for fishing. This definition covers a wide r ...
26-04-2018 16:12

America Inside Out ? Your Brain on Tech | Full Episode



Katie Couric explores the many ways that technology is upending our lives. ? Subscribe: About Perpetual Planet Rolex an ...
26-04-2018 16:10

Tech's Impact On Young Brains | America Inside Out with Kati



Katie sits down with Dr. Larry Rosen, a tech psychologist and author, to discuss what the science says about what technology is doing to developing br ...
26-04-2018 16:10

Pinggan Puteh @ Shah Alam



By Aiman AzriBridging the past and the present, Pinggan Puteh pours white-hot local flair into every plate, combining classic kampung sensibilities wi ...
26-04-2018 16:04

Don't forget the details! Trait ecology and generality



The search for generality is perhaps the greatest driver of modern ecology and probably also the greatest source of ecological angst. Though ecologica ...
26-04-2018 16:04

Emerging



Looking in the sweep meadow I spotted a yellow rattle seedling just poking up form the surrounding vegetation. These grow very quickly at this time of ...
26-04-2018 16:03

The Museum of (my) Discoveries



Exhibition "Return - Traces of Memory", Monument odf the Discoveries, Lisbon, 2015 (Photo: Maria Vlachou)I\'m Portuguese by adoption. When I arrived i ...
26-04-2018 16:03

Relationship between biodiversity and public health via an e



Some examples of relationships between health, biodiversity, and ecosystem services. Its thus crucial that we alter the rapid loss in biodiversity. ...
26-04-2018 16:03

Facing the Housing Crisis for DD with a Diversity of Solutio



NOS Magazine is a ?news and commentary source for thought and analysis about neurodiversity culture and representation?. For the uninitiated, neurodi ...
26-04-2018 16:03

Consuming protein supplements with meals may work better for



A new systematic review of available evidence appearing in Nutrition Reviews indicates that consuming protein supplements with mea ...
26-04-2018 16:03

Study links night exposure to blue light with breast and pro



Researchers used images taken by astronauts to evaluate outdoor lighting in Madrid and BarcelonaBarcelona Institute for Global Health (ISGlobal) ...
26-04-2018 16:03

When do problems with memory and decision-making affect olde



For older adults, driving can mean living a more independent, satisfying life. Therefore, it\'s ...
26-04-2018 16:03

Adults who eat breakfast gain less weight



Although studies have shown an association between eating breakfast and healthy body weight in children and teenagers, less research has focused on ...
26-04-2018 16:03

Drinking water may help exercising seniors stay mentally sha



Older people should drink more water to reap the full cognitive benefits of exercise, new research suggests. The study, to be pr ...
26-04-2018 16:03

Even a single mindfulness meditation session can reduce anxi



Mindfulness meditation programs have shown promise for the treatment of anxiety, one of the most common mental ...
26-04-2018 16:03

Opioid use linked to increased risk of falls, death in older



 Recent opioid use is associated with an increased risk of falls in older adults and an increased risk of death, found new research in CMAJ (Canadia ...
26-04-2018 16:03

ORIGINAL REPORTING: Why Utilities Need To Respond Now To The



Why utilities need to respond now to the EV boom; Utilities can either embrace electric vehicle growth or be caught "flat footed" when new power deman ...
26-04-2018 16:03

ORIGINAL REPORTING: Transmission Developers Power Forward In



Transmission developers power forward in West as move to single market inches along; Planners and developers across the West are going as far and fast ...
26-04-2018 16:03

Most Kentucky adults believe addiction is a disease but a fo



It is widely understood by health professionals that addiction is a disease, and a recent poll found that most Kentucky adults believe that, too. But ...
26-04-2018 16:03

More large to medium Kentucky hospitals rated low for patien



By Melissa PatrickKentucky Health NewsA nonprofit group that rates hospitals has released its latest patient-safety grades, once again giving most Ken ...
26-04-2018 16:03

Fishing Lures: How To Attract Those Fish



There are literally hundreds if not thousands of different fishing tackle lures on the market today. Some are very effective at getting those bass, ...
25-04-2018 16:10

Fishing – How to Choose the Right Fishing Rod



There are many ways to catch fish. A fisherman can surely catch fish with his hands. He can catch fish with a spear. He could even cast a net over a s ...
25-04-2018 16:10

Freshwater Fishing Beginners Guide, All-Purpose Fishing Rod!



Choosing the right fishing rod can be a challenging task, especially for the casual or hobbyist fisherman considering taking the sport more seriously. ...
25-04-2018 16:10

Champion Slackliners Cross Between Frozen Waterfalls in the



For highliners Lukas Irmler and Pablo Signoret, the ascent up two frozen waterfalls with 400-plus pounds of gear is only a prelude to the main action: ...
25-04-2018 16:10

Tiny Sea Creatures Could Create Big Ocean Currents | Nationa



Previously, scientists believed that zooplankton could only affect the water in their own size range. But a new study demonstrates, as a group, they c ...
25-04-2018 16:10

VIDEO: Deaf since childhood, Razali Bin Mohamad Habidin has



VIDEO: Deaf since childhood, Razali Bin Mohamad Habidin has developed a closer bond with the creatures under his care than any other keeper at Singapo ...
25-04-2018 16:05

Mancave Cafe & Collectibles @ Puchong



Mancave could easily be renamed Batcave, with Dark Knight memorabilia spread across this space. But with Thor\'s hammer and Captain America\'s shield ...
25-04-2018 16:05

Jjajangmyeon ??? (Korean Blackbean Noodles)



Korean food again!" hahaha actually I just want to update some of my old pictures in my old blog posts. ^.^ Anyway my kids love this slurpy noodle dis ...
25-04-2018 16:05

Time on the Marsh



Overcast with light rain, 12°, light SW. My usual visit to the marsh this morning with a few rain showers to dampen the walk. I did not walk the whole ...
25-04-2018 16:03

Towards Cultural Access and Participation in Portugal



My article for the magazine Howlround, on the occasion of the IETM plenary meeting that takes place in Porto this monht. Read the article ...
25-04-2018 16:03

Destroy the Accounts...



"Destroy the Accounts, forgive yourself, be sin free and allow what is trying so hard for thousands of years to reach you...Reach you" The heart. ...
25-04-2018 16:03

Idaho water supply outlook for 2018 looks promising



By Sean EllisIdaho Farm Bureau FederationPOCATELLO­ ?Farmers and ranchers throughout Idaho should have an ample supply of irrigation water this year.L ...
25-04-2018 16:03

Idaho Fuel Prices Up



Boise?Alex Reed is planting beans outside of Filer this week and he got an unpleasant surprise.When he went to fill up his truck gas prices had spiked ...
25-04-2018 16:03

APPLE PIZZA PIE



APPLE PIZZA PIE A delicious shortbread crust topped with a cream cheese filling and mildly-spiced diced cooked apples. This tart is made quickly and i ...
25-04-2018 16:03

BACON ONION CHEDDAR MUSHROOMS



BACON ONION CHEDDAR MUSHROOMSVery simple side dish, but high on taste!  Mushrooms are so versatile, however, keeping them simple is one of my favorit ...
25-04-2018 16:03

Statins save lives of people with high levels of LDL cholest



Cholesterol-lowering drugs are more likely to save thousands of additional lives when used in people with higher levels of LDL ...
25-04-2018 16:03

Eating more fish could prevent Parkinson's disease A study



A new study from Chalmers University of Technology, Sweden, shines more light on the link between consumption of fish and better long-term neurologi ...
25-04-2018 16:03

Fetal exposure to moderate/high caffeine levels linked to ex



Exposure to moderate to high caffeine levels while in the womb is linked to excess weight gain in early childho ...
25-04-2018 16:03

Six in 7 women at high risk of breast cancer shun tamoxifen



Six in seven women with a family history of breast cancer opt out of taking tamoxifen as a ...
25-04-2018 16:03

Strength training in older women needed to ward off effects



Regular physical activity may help older women increase their mobility, but muscle strength and endurance are likely to succumb to the effects of fr ...
25-04-2018 16:03

Prenatal cannabis use associated with low birth weights



With marijuana use during pregnancy on the rise, a new study led by the Colorado School of Public Health shows that prenatal canna ...
25-04-2018 16:03

Prolonged Tylenol use during pregnancy linked to increased A



A study from the Hebrew University of Jerusalem sheds new light on the possible relationship between prolonged ...
25-04-2018 16:03

Mental, not physical, fatigue affects seniors' walking abili



Low "mental energy" may affect walking patterns in older adults more than physical fatigue. New research about ...
25-04-2018 16:03

Soccer heading -- not collisions -- cognitively impairs play



Worse cognitive function in soccer players stems mainly from frequent ball heading rather than unintentional head impacts due to collisions, researc ...
25-04-2018 16:03

Dark chocolate consumption reduces stress and inflammation



New research shows there might be health benefits to eating certain types of dark chocolate. Findings from t ...
25-04-2018 16:03

A link between pneumonia in older people and Proton-pump inh



A study published in the Journal of the American Geriatrics Societyhas found a link between pneumonia in older people and Proton-pump inhibitors ...
25-04-2018 16:03

Millennials aren't getting the message about sun safety and



IMAGE: Many millennials lack knowledge about the importance of sunscreen and continue to tan outdoo ...
25-04-2018 16:03

TODAY?S STUDY: The Value Of Offshore Wind



Estimating the Value of Offshore Wind Along the United States? Eastern Coast Andrew D. Mills, Dev Millstein, Seongeun Jeong, Luke Lavin, Ryan Wiser, ...
25-04-2018 16:03

QUICK NEWS, April 24: Another ?This Is It? Moment For Climat



Another ?This Is It? Moment For Climate Change One of the most worrisome predictions about climate change may be coming true Chris Mooney, April 23, ...
25-04-2018 16:03

Strawberry Semifreddo ? Semi-Amazing



I used to tell my students to never try making classic desserts ?healthier,? since your guests will always compare it to the unhealthy, and undoubtedl ...
25-04-2018 16:03

How To Clean Your Spinning Reel



As the weather begins to warm up and fishing season approaches, it’s time for every angler to start getting their gear organized. One of the things ...
24-04-2018 16:12

The Big Catch: Using Bass Fishing Rods, Baits, and Reels



Fishing is a common American hobby. Many families take fishing trips to spend quality time and enjoy a fresh catch. To make your trip more enjoyable, ...
24-04-2018 16:12

Why Budget Limited Fishermen and Boat Enthusiasts Love Used



It's not every day that you discover that you can have something that you previously thought was beyond your price range. When the hot summer r ...
24-04-2018 16:12

Major dam removal in Zurich



Switzerland celebrates its first major dam removal with the clearance of a 50-metre barrier at the confluence of the Sihl and Schanzengraben rivers in ...
24-04-2018 16:10

Profile: Cooking Ah Pa



By Aiman AzriHow did a Malaysian real estate guru become a social media cooking star, earning more than 10,000 Facebook fans within months" By prepari ...
24-04-2018 16:04

Mankwonwhabap @ Cheras Leisure Mall



By EDKL Writer A.A.Straight out of Busan, barbecue specialist Mankwonwhabap has been brought into KL by a Korean family, setting up its first Malaysia ...
24-04-2018 16:04

Some light bedtime reading" Last years Annual Report



Every year we present a report to our Blashford Lakes Project partners, Bournemouth Water, New Forest District Council and Wessex Water, covering the ...
24-04-2018 16:03

Moths and a bit More



The thunder on Saturday night heralded a change to more normal spring weather, but the burst of summer has produced a marked change. In a matter of th ...
24-04-2018 16:03

 

 



Would you like your blog and posts leave here?


 
         

News most viewed Today

Foodlogy French-Italian Restaurant @ Viva Residency, Sentul

Foodlogy French-Italian Restaurant @ Viva Res...

French & Italian fare, carefully prepared by two Malaysian sisters coached by a respected French F&B consultant, surfaces this month at this casual restaurant in Sentul\'s Viva Residency, not too far from the Kuala Lumpur Performing Arts... -
SEVAI Promotes quality of life improvement and income generation activities among SHGs.

SEVAI Promotes quality of life improvement an...

Process of Korai mat production by women SHGsA Trichy based NGO-SEVAI SEVAI Promotes quality of life improvement and income generation activities among SHGs and it focuses on improving access to and control of the marginalised communities over... -
Guantanamo @ Kota Damansara

Guantanamo @ Kota Damansara

Part old-fashioned warung, part contemporary cafe, Guantanamo hopes to keep hunger at bay with traditional temptations like a fiercely fiery asam pedas ikan merah, more pedas than asam (RM17.90 in a set with steamed rice), daging salai masak lemak... -
Kalam Award for Quality of Life Improvement 2016-17. Citation Mr.M.Subburaman,Sanitation Expert, Founder of SCOPE.

Kalam Award for Quality of Life Improvement 2...

Mr..M.Subburaman presented with OZONE KALAM AWARDM.Subburaman. is an expert in the field of Eco sanitation and he is the founder of SCOPE NGO.SCOPE an NGO based in Tiruchi, established in 1986 concentrates on rural development, empowering the... -
Three simple ideas: Cooking from scratch

Three simple ideas: Cooking from scratch

Lately I\'ve been sharing with you simple ideas for getting started with simple living.  As many of us have discovered, simple living isn\'t simple, certainly when you\'re getting started, there are lots of new skills to learn and its... -
Using Dehydrated Food for Travel

Using Dehydrated Food for Travel

I\'ve got a trip coming up where I will use dehydrated food in two different ways:  for a 6-day backpacking trip, and for spending a few days here and there in remote locations without a grocery store.  I also used it for an airplane trip to... -
Wolf Depredation

Wolf Depredation

Funding Available for Wolf Depredation CompensationBoise--The Office of Species Conservation is now accepting applications for compensation for verified livestock losses due to wolves that occurred in Idaho during the 2017 calendar year. The... -
Potter's Cafe @ Petaling Jaya

Potter's Cafe @ Petaling Jaya

Cakes, coffee and tea in a friendly art gallery, discreetly tucked away from the urban bustle: Potter\'s Cafe is one of PJ\'s pleasant little secrets that\'s well worth sharing.Potter\'s Cafe29, Jalan Utara, Petaling Jaya, Selangor. Open... -
Shawarma King @ Telawi, Bangsar

Shawarma King @ Telawi, Bangsar

Beginning its reign in Bangsar this month, Shawarma King boasts a crown jewel of a shawarma wrap that\'s royally stuffed with tenderly grilled lamb and chicken, crisp vegetables and no fewer than five sauces, conveying nuances of garlic, onions,... -
Fish in the blood stream

Fish in the blood stream

Fisherocytes are rarely seen in the peripheral blood....Source: Facebook by -

More Blogs
Social
 

Thenatureworld Directory
- Insert Blog

 

contacto:
[email protected]