teleren/devto huggingface dataset:
74 Coding Problems
Tags: codingprojects, c, javascript, codingchallenges
Published: 2020-01-21 22:20:24

---
title: 74 Coding Problems
published: true
description: A bunch of coding problems to sharpen your coding skills with
tags: coding projects, c++, c, javascript,coding challenges
---

So awhile ago I posted an article with the same title; however, it had to be deleted because I didn't read (where is the dunce cap 🤦‍♂️). Well, I am here to try again and go more in depth with a few of the projects and the languages I did through out college. You will be able to find the full list [here](https://jstroup.dev/article/seventyfour) and at my link down below. Let's begin!

I not only added a list of the projects but also the languages I wrote them in. You will find languages such as:
<ul>
<li>Assembly x86</li>
<li>C</li>
<li>C++</li>
<li>Javascript</li>
<li>PHP</li>
<li>R</li>
<li>Bash</li>
<li>Perl</li>
<li>Python</li>
<li>Visual Basic</li>
</ul>

Of course you don't have to write the projects in the same languages they fall under. They are there to maybe introduce you to something new. Projects range from simple to difficult in both project and language.

Here are some of the projects you will find on the list:
<ul>
<li>Plenty of Algorithms (Hash Tables, Linked List, etc)</li>
<li>Battleship game</li>
<ul>
   <li>Nothing Fancy, built right in the console window, 1P, 2P, and basic AI</li></ul>
<li>Bash Shell</li>
<ul>
   <li>Similar to what you find on linux with the same commands. ls, cat, tail, etc </li></ul>
<li>Wack-a-mole</li>
<ul>
   <li>Complete UI that kept score and a timer to end the game</li></ul>
<li>Sanitize credit card numbers</li>
<ul>
   <li>As it sounds, take any credit card (credit cards have a specific number of digits and specific starting digits EX: Visa starts with a 4 and has either 13 or 16 digits) number and replace all but the last X digits with ...</li></ul>
<li>Notepad application</li>
<ul>
<li>Complete GUI with common text editor functionality. Save, load, format text, etc</li></ul>
<li>Address Book</li>
<ul>
<li>Also exactly what it is. Name, phone number, address, etc</li></ul>
</ul>

As you can see, the projects listed are pretty well rounded. It might also show how something so simple as to counting characters can be more difficult in other languages. I am curious as to what project you are going to build and with what language.
If you get to this point and are curious as to what else is on the list, here is the link [https://jstroup.dev/article/seventyfour](https://jstroup.dev/article/seventyfour). Happy Coding!

For those that are curious and are wondering why there isn't a comment section. I haven't got around to it yet 🙂. I built the site from scratch and still struggling with finding a good UI unfortunately. The joys of coding 😅
Playing around with Elvish, a new(ish) shell
Tags: bash, linux
Published: 2020-01-21 22:09:36

[^1]

### Discovering Elvish

Last year the youtube algorithm suggested I watch [this video](https://youtu.be/AteBFq1jk8A), a brief explanation of the vision behind a new shell.  The video itself was a few years old, so I was pleased to discover a busy Github repo and active community.  I installed elvish and went about my business, pridefully thinking that my familiarity with bash would act as a stalwart defense against any noob mistakes.  [A](https://github.com/elves/elvish/issues/828) [couple](https://github.com/elves/elvish/issues/829) of noob mistakes made in quick succession convinced me I had better read the docs anyway.

This wasn't as bad as expected.  The Elvish docs were expertly organized and easy to read.  For maybe the first time *ever* I felt inspired to write a decent amount of code in a shell scripting language.

Elvish offers first-class support for a number of features that are interesting to find in a shell scripting language, but they are seamlessly integrated and never feel out of place.

- lexical scopes
- types/kinds
- sensible math operators
- proper function signature with var-args
- plus optional named params with default values
- higher-level functions
- persistent, immutable lists & **maps**
- parallel execution
- namespaces
- package manager!!!
- so much more...


One feature I have not yet taken advantage of in my own projects are the [styling builtins](https://elv.sh/ref/builtin.html#styled).  I am eager to see how they simplify some extant parts of my project.


### Goofing around

The first thing I did was to implement some of the core library functions from Clojure. [^2]

```elvish
fn partial [f @supplied]{
  put [@args]{ 
    @args = (base:check-pipe $args)
    $f $@supplied $@args 
  }
}

fn juxt [@fns]{
  put [@args]{
    @args = (base:check-pipe $args)
    for f $fns {
      $f $@args
    }
  }
}

fn reduce [f acc @arr]{
  for a $arr {
    acc = ($f $acc $a)
  }
  put $acc
}
```

This gives you currying, juxtaposition, and (ofc) folding.

```
# all of this available in the 'fun' and 'base' namespaces
# except in the float64 type signature, '()' is output capture in elvish eg '$()' or '``'
# $<fn>~ is a function handle/reference

~> (fun:juxt $base:dec~ $base:inc~) 10
(float64 9)
(float64 11)

~> (fun:partial $+~ 2) 10
(float64 12)

~> fun:reduce $+~ (range 10)
(float64 45)
```


In the next entry I may write about my approach to lazy iterators(**!!**) in Elvish, or how seamless the Elvish package manager has made the development process.


[^1]: Cover image made by Matty Rodgers - unfinished piece entered in a competition.
[^2]: I eventually wrote a great deal of them [here](https://github.com/crinklywrappr/rivendell/blob/master/fun.elv).
Gardening
Tags: productivity
Published: 2020-01-21 21:55:17

I was standing in my backyard and I could see lots that needed to be done: hedge trimming, grass mowing, dead branches to be removed, and so much more. I started on consolidating some unused flower pots into a single spot. While doing that I thought it would be a good idea to remove an overgrown fern. I pulled the fern down and then got distracted by the idea of some other task.

My Dad, who is a gardening enthusiast, arrived about an hour later to drop off some tools. He took a look around at my yard and gave me some advice. He encouraged me to finish one job completely and to tidy up any mess before moving onto the next job. Without realising I had started three or four different jobs - all currently at different levels of completion. My Dad's logic was that you might be interrupted at any point and you don't want to be in a position where you are left with large cleanup jobs, or where you have to leave the yard in a bad state with unfinished and dangerous things around.

I spent the next few hours going through each of the jobs I had started earlier and finished them one by one, cleaning up as I went. I didn't get through as much of the gardening as I would have liked that day (things had a bad habit of taking longer than I expected) but everything I started I finished. I could come back another day to do the remaining jobs. The yard was left tidy and the kids could enjoy it.

**Focus on one task at a time. Get it done. Tidy up. Then move on**
Working on a collaborative edu project
Tags: javascript, github, codenewbie, design
Published: 2020-01-21 21:53:19

I'm planning an intro web design/figma/beginner coding class at my local library. It's inspired by git a bit on the link below I planned the workflow to be modular so library, school, dev can copy make it their own. Also, I'm open for collaborations and I would love any input or advice planning this. The entire idea is that designers, coders, and hardware hackers ext..give two to three hours at their local libraries, or hold events ext... 

https://nodedataedu.glitch.me/
cant relate to #nocode, #nosql or #noserver concepts ? maybe you can relate to #nocash
Tags: nocode, nodql, serverless, ux
Published: 2020-01-21 21:51:55

cant relate to #nocode, #nosql or #noserver (#serverless) ? theres even something called [#noopener](https://dev.to/dhilipkmr/why-should-you-use-noopener-beware-of-security-flaws-3i57?utm)

well here is something you can relate to the concept of #nocash

my vote is 10/10 for both UI & UX although the big red sign should probably say NOCASH too

![photo of cash machine with door open showing no cash inside](https://thepracticaldev.s3.amazonaws.com/i/a3ddklbl52xjskj0cnul.jpg)
BYO a #nocode chromium browser extension in 2 steps 
Tags: browser, extension, javascript
Published: 2020-01-21 21:43:42

ok so there is nocode so it doesnt actually do anything BUT at least you get to see an icon in the toolbar which more than i can say for some other examples ive seen recently

https://developer.chrome.com/extensions/getstarted

STEP 1
```
$ mkdir mychromeext
$ cd mychromeext
$ vi manifest.json
  {
    "name": "Getting Started Example",
    "version": "1.0",
    "description": "Build an Extension!",
    "manifest_version": 2
  }
```

STEP 2
```
* run chromium
* browse to chrome://extensions/
* click enable developer mode
* click LOAD UNPACKED 
* nav to ./mychromeext [just the directory manifest file is invisible]
* click open
```

thats it you now have your very own noddy chromium extension in 2 steps

STEP 3 (optional)
add some code to only enable your chromium extension button when on DEV.TO pages see https://github.com/osde8info/chromium-extension-101/releases/tag/0.0.7

STEP 4 (optional)
cheat and download full prewriten example code for an extension that only enables itself on developer.google.com webpages and then lets you choose a background colour of red,green,yellow or blue 
* https://developer.chrome.com/extensions/examples/tutorials/get_started_complete.zip

STEP 5 (optional)
try the extension that only gets enabled when on dev.to pages

* https://github.com/osde8info/chromium-extension-101/releases/tag/0.0.9
DEVTO page after your chromium browser extension has set the backgrond to green
![devto with green bg](https://thepracticaldev.s3.amazonaws.com/i/g54rzvay6lg6xfz54sv2.png)

![devto with red bg](https://thepracticaldev.s3.amazonaws.com/i/e0nbth2hvo6wpat485c1.png)
MegaMimes : A C Mime Type Library
Tags: c, cpp
Published: 2020-01-21 21:37:07

Determining the Mime Type of a file In C has not been easy.  Developers need an external table , which usually comes as an external file, which contains just a few mime types of various file extensions, Well I don't blame the developers, THERE IS NO ALGORITHM TO CHECK THE MIME TYPE OF A FILE. What if the FILE was deleted ? . That will be very awful for the program. Most people who do not want to use external files normally resort to using web services. This can unbearably slow, because of network problems. Now these problems of determining the MIME TYPE of a file from your C Code can be solved by [MegaMimes](https://github.com/trumpowen/MegaMimes). 
[MegaMimes](https://github.com/trumpowen/MegaMimes) is a C Library that is used to determine the MIME Type of a file, with just a few code. The MIME Type table comes embedded in the library and as a result, no need for external files, web services and any other technique.  The library works on all major Operating Systems ( Windows, Linux,, Mac OS X ) . The library can be extended by adding your own mime types, if they do not exist in the table. MegaMimes has no dependencies, which makes it very easy to install!!!!
Do not fail to check it out. 
If the library proves helpful to you, do not forget to give it a STAR. If you have any contributions, you can open a pull request and an issue. Thank You
Building a site from scratch. Part 1 - Description and first design
Tags: beginners, react, webdev, tutorial
Published: 2020-01-21 21:32:56

---
canonical_url: "https://buaiscia.github.io/posts/building-site-from-scratch-description-design"
---

## What, how and why

For some time now I wanted to create my wife's website for her art. I'm still a junior developer, building projects with my self-taught knowledge. So far I've worked with nodeJS-EJS and React as frontend technologies, and mongoDB and Firebase as backend.

But I want to improve my React and DB knowledge (apart from SQL which I use everyday for work). So, as I made my personal website (<a href="www.alexbuaiscia.com" target="__blank">www.alexbuaiscia.com</a>) with just HTML/JS/EJS/MongoDB, and I used the other techs just for work-related projects, I wanted to give a try to building something personal with React and Firebase. 

I was tempted to use Apollo-GraphQL, but then the technology is much newer and lesser used, so it'll go into my next project.

So anyway, the project will proceed one step at a time, and I decided to document the whole process, so that maybe somebody will benefit from it... and most of all myself, as there are many things that I'll learn along the way.
I'm documenting all this, also, for its creative process more than super-correct practices. So take it more for inspiration for your own creativity, more than real examples to follow line by line.

Ok, so on with the project.

## Let's start

Phase1: designing it. My wife and I started to put down some ideas and used Figma to make a sketch of the categories and the landing page. It's far from finished and looks like this.

![First_sketch](https://thepracticaldev.s3.amazonaws.com/i/mpul6c0j9yf4lwaw06gx.jpg)

It's a website about art so something artistic must have been done. I know how to style the texts into the tree and Figma give some nice CSS...although with absolute references. So far I've an idea on how to make it on mobile, but not sure about sizes in the middle.
I'm not sure 100% about the colors that get a little lost with the tree, but there will be time to work it out.

We haven't designed the other pages yet, but will be more frontend-friendly (more normal grid ie.). The tree will stay opaque in the background.

Ah, important note: the image in the landing page is actually a placeholder. It will be a video ;)
I'm not a designer by profession so it's all an experiment.

And a super important point: feedbacks are most welcomed! Send me a message (Twitter DM or other contact)

Thank you for reading and see you in the next one!

Original post <a href="https://buaiscia.github.io/posts/website-from-scratch-react-firebase/" target="__blank"> here on my blog. </a>

Alex
A tell about my Motivation
Tags: motivation
Published: 2023-03-28 22:31:51

---
title: A tell about my Motivation
published: true
date: 2020-01-21 21:09:30 UTC
tags: motivation
canonical_url: https://medium.com/@timfosteman/a-tell-about-my-motivation-6c1a0138b97c
---

Whence reviewing my knowledge base for upcoming interviews this winter, I gained a vision over one of my accomplishments I never felt was anyhow important. Appears I was blind to a source of my motivation which drives me each and single day.

One accomplishment of mine, I must admit, may sound rather minuscule and uninspiring. Turns out, to the contrary of this common thinking, it’s one of those inspiring things that direct our lives.

It began March the twelfth, 2016, I turned 16, first time in millennia, and received a gift. It was RepRap 3D printer, which jolted my imagination and fuelled ambitions to things above and beyond printing free models.

I think I am proud for myself, my congruence on which I leaned, whence the graduation time from high school marked the conscious choice for my profession. It’s that congruence that now transcends my life endowing joy and purpose.

Listen to yourself in moments of choice, the right answer is often most obvious one.
Changelog: Open-Dyslexic font available in settings
Tags: meta, changelog, a11y
Published: 2020-01-21 20:47:27

# **👉 [/settings/ux](/settings/ux)**

DEV now offers `Open-Dyslexic` as a customization option.

Thank you to @codebytere for creating the PR and @bnb for opening the issue.

{% github https://github.com/thepracticaldev/dev.to/pull/5037 %}

The accessibility of our platform and the web in general is a big deal for us. Anything we ship to improve things is a win. As we gradually march [towards generalization of our underlying engine](https://dev.to/devteam/the-future-of-dev-160n), we look forward to propogating this work to more and more folks.

# **👉 [/settings/ux](/settings/ux)**

Happy coding ❤️
tiktok api
Tags: smn, video, api
Published: 2020-01-21 20:47:18

has anyone got any experience of using the tiktok api ? 

apparently you can *convert a TikTok's video URL into embedded video markup by using the oEmbed API. It allows you to get the embed code and additional information about the video associated with the webpage link provided.*

see
* https://www.tiktok.com/forgood
* https://developers.tiktok.com/doc/Embed

see also
* https://dev.to/gunnu/an-interactive-demo-of-the-tiktok-xss-vulnerability-n3c
chrome apps are dead its time to migrate to PWAs or extensions
Tags: chromium, browser, extension
Published: 2020-01-21 20:40:05

https://blog.chromium.org/2020/01/moving-forward-from-chrome-apps.html


As of 21 Nov 2016, *all newly published packaged or hosted apps are restricted to Chrome OS, and are not available to users on Windows, Mac or Linux. All packaged and hosted apps will be removed from Chrome Web Store search & browse functions in mid-December 2017. Existing apps will continue to work and receive updates.*

As of 15 Jan 2020 *Chrome will be removing support for Chrome Apps on all platforms. Chrome browser and the Chrome Web Store will continue to support extensions.*

And *the V0 draft APIs are now targeted for removal in Chrome 80, around February 2020*

see
* https://www.chromestatus.com/features
* https://developers.chrome.com/apps/migration
* https://developer.chrome.com/extensions/getstarted
* https://chrome.google.com/webstore/devconsole/

check your 'new' extension doesnt use any V0 apis
* https://developers.google.com/web/updates/2019/07/web-components-time-to-upgrade#back-to-the-future-disabling-the-v0-apis

close chromium and restart it with the command-line flags:

`--disable-blink-features=ShadowDOMV0,CustomElementsV0,HTMLImports`

open console and run `console.log("Native HTML Imports?", 'import' in document.createElement('link'))` should return `false`
Yamaha YAS-109 Soundbar has Excessive Network Traffic
Tags: iot, network, privacy
Published: 2020-01-21 20:11:13

This is an appeal to any of you who is coding for, or otherwise developing connected devices, to put some extra thought into your network traffic. Maybe also a warning to consumers and an encouragement to us tech savvy people to monitor your connected devices.

I recently bought a soundbar for my TV, a [Yamaha YAS-109][2]. When I looked at my [Pi-hole][1] dashboard a few weeks later, I was surprised. The soundbar was by far the most active device on my network, event though it has mostly been "turned off" (standby mode). 

![Pi-hole dashboard showing top active clients by request. Soundbar has 36996 requests, while second most active device has 3052.](https://thepracticaldev.s3.amazonaws.com/i/y4ja35635uwvvxx9u4jk.png)
<figcaption>
The most active device I have in my network is apparently the soundbar (192.168.1.197), by far.</figcaption>

Looking at what all these requests are, filtered on the soundbar only, shows the following. 

![URL's for Alexa, Yamaha, Spotify and Google is in the list](https://thepracticaldev.s3.amazonaws.com/i/88ez04lx0i1zwxy8u56e.png)

Clearly it's calling the [Alexa][5] service a lot and I want to point out that I have hit the mute button, that according to the manual, should ensure privacy (disable Alexa). The manual also states that I have to configure an Amazon account if I want to use the Alexa service, which I haven't done. 

Resetting Pi-hole statistics and just looking at a few minutes of traffic, I saw the following requests:
* ap.spotify.com (~14 times/min)
* avpro.global.yamaha.com (~8 times/min)
* avs-alexa-na.amazon.com (~8 times/min)
* www<span>.google</span>.com (~3 times/min)
* various [NTP][3] servers (~3 times/min)

Note that this was logged when the device was in standby mode and no traffic is blocked, so it shouldn't be a bad retry logic gone wild. The soundbar has [Spotify Connect][4], but I haven't used that feature. Why it needs to contact www<span>.google</span>.com so often, or frankly - at all, is beyond my understanding. Although I have a bad habit of checking my wrist watch a bit too often, I think calling a time server several times a minute for a soundbar in standby mode is just ridiculous. 

This isn't the worst example of an _[Internet of Shit][6] device_, since the core functionality of being a speaker works perfectly fine without an Internet connection (that's the way I run it now). I don't know _why_ it's "calling home" so frequently, it might not be evil, but it sure abuses my network in a non-justifiable way.

So, if your company produces similar consumer electronics and especially if you're writing the code for it, please don't do this. If you're not monitoring your home network, please do. [Setting up Pi-hole][1] is really simple!




[1]: https://pi-hole.net/
[2]: https://uk.yamaha.com/en/products/audio_visual/sound_bar/yas-109/index.html
[3]: https://en.wikipedia.org/wiki/Network_Time_Protocol
[4]: https://www.spotify.com/uk/connect/
[5]: https://en.wikipedia.org/wiki/Amazon_Alexa
[6]: https://twitter.com/internetofshit
Django News - Issue 6
Tags: django, python, contributing
Published: 2020-01-21 19:59:13

---
title: Django News - Issue 6
published: true
date: 2020-01-17 16:20:52 UTC
tags: django, python, contributing
canonical_url: https://django-news.com/issues/6
---

## News

### HTTPX Release

[HTTPX](https://cur.at/DT0HE9t?m=rss) is a next-generation HTTP client, likely the successor to the popular [requests](https://cur.at/WT3qIdV?m=rss) package. This latest release of HTTPX supports both sync and async and is one step away from a forthcoming 1.0 release.

----

### [Django Day Copenhagen 2020 - April 17, 2020](https://cur.at/Aa5yADX?m=rss)

The [call for participation](https://cur.at/qBmnqtb?m=rss) is currently out for this one day Django conference.

----

### [DjangoCon Europe Early Bird Tickets Now Available](https://cur.at/Mp05A51?m=rss)

The conference is in Porto, Portugal from May 27-31, featuring 3 days of talks and 2 days of springs.

----

## Articles

### [Advice for new contributors from the Django documentation](https://cur.at/wBTZQ4E?m=rss)

There are many ways to contribute to Django itself, especially the documentation. Here is a getting-started guide. If you have any issues, put a question on the [Django Forum](https://cur.at/ymRJDar?m=rss) and you'll get help!

----

### [Make Django Tests Always Rebuild the Database if It Exists - Adam Johnson](https://cur.at/E6NZX72?m=rss)

An elegant quick fix for a common Django issue.

----

### [Counting Queries: Basic Performance Testing in Django - Vinta Building Beyond Blog](https://cur.at/TOVRElU?m=rss)

A nice overview of first-pass performance testing in a Django app.

----

## Videos

### [Django REST Framework Full Course for Beginners](https://cur.at/WFSFjif?m=rss)

A 2+ hour course on building APIs with Django 3.0.

----

### [DjangoCon 2019 - Feeding the Pony: Contributing back to Django & How to make that work for you](https://cur.at/GlKf6vi?m=rss)

Django Fellow Carlton Gibson describes the current state of Django contributions and how/why anyone can become involved.

----

## Podcasts

### [DjangoChat #46 - Django's Async Future with Tom Christie](https://cur.at/be9MAiE?m=rss)

Tom is the creator of Django REST Framework, HTTPX, and a whole suite of new async Python web stack packages.

----

## Projects

### [django-migration-linter](https://cur.at/uMmosw7?m=rss)

> Detect backward incompatible migrations for your Django project

----

### [carltongibson/dcus2019sprints: Notes for "Getting started contributing to Django" sprints workshop.](https://cur.at/YBBbiPh?m=rss)

Django Fellow Carlton Gibson's notes for "Getting started contributing to Django" sprints workshop.

----

This RSS feed is published on [https://django-news.com/](https://django-news.com/). You can also subscribe [via email](https://django-news.com/#cta-newsletter).