teleren/devto huggingface dataset:
What are the building blocks of the software?
Tags: healthydebate, discuss, programming, computerscience
Published: 2019-08-16 17:05:53

---
title: What are the building blocks of the software?
published: true
description: What every programmer should know to understand the programming independently of language and paradigm? What are the most basic building blocks in software development?
tags: [healthydebate, discuss, programming, computerscience]
cover_image: https://thepracticaldev.s3.amazonaws.com/i/gzhhigtpgjtoiuyjc5dl.jpg
---

In geometry they have axioms. You take those axioms and you can build all theorems based on it. See Euclid's Elements.

In chemistry they have atoms. All materials consist of atoms. So you need to study atoms and how atoms interact and you can understand chemistry (I'm no a chemistry major, but I guess this is a big part of chemistry). See the Periodic table of elements.

In architecture, they have units from which they construct buildings, like windows, walls, stairs, etc. See Pattern Language by Christopher Alexander et al.

My question is: What are the building blocks of software development? 

Is it **algorithms and data structures**? I don't think so, because we don't have an exhaustive list of them, those are more like premade receipts. More like theorems in geometry, not axioms.

Is it **design patterns**? Is it objects? I don't think so, because those are paradigm specific.

Is it **monads**? Maybe. I'm not sure about that. Can we describe assembly with it (my guess we can, because it is a very abstract field, but the question will it be comfortable to use for that case)? Is it paradigm specific or more universal?

Is it even possible to have one set of building blocks? Or we need different sets for low-level code (assembly) and high-level code (for example, functional languages). Maybe we can define different levels of abstractions and find building blocks for each level? 

Maybe what think of [as different abstractions are the same thing](https://github.com/thma/LtuPatternFactory)?

![](https://thepracticaldev.s3.amazonaws.com/i/rsaismawjvbehxkys6by.gif)

Source of the image: [reddit](https://www.reddit.com/r/blackmagicfuckery/comments/845n8g/these_shapes_shouldnt_be_able_to_coexist_like_this/).

What every programmer should know to **understand the programming independently of language and paradigm**? What are the **most basic** building blocks in software development?

> Photo by Rick Mason on Unsplash
Ruby quick tip: ABC, Always Be Constantizing
Tags: codequality, readability, structuredapplications, ruby
Published: 2019-08-16 17:00:00

Ruby has a reputation as one of the most fast and loose languages in modern programming, but in reality, it has a number of subtle features that help ensure the intent of your code is fairly clear.

For example, if you try to define a class like this...

```rb
# ./puppy.rb
class puppy
end
```

The interpreter will tell you

```
SyntaxError (./puppy.rb:2: class/module name must be CONSTANT)
```

And you will have no `puppy` to speak of :[

Constants have a lot of great uses, but their biggest strength is in helping you organize your code and provide context around what a literal is used for.

```rb
class Action < ApplicationRecord
  scope :accepted, -> { where(type: "accept") }
  scope :rejected, -> { where(type: "reject") }
  scope :requested_changes, -> { where(type: "changes_requested") }

  # ...
end
```

These scopes contain string literals that likely aren't going to change, but suppose a major rewrite of this app's business logic occurred, and they suddenly _did._  If a developer misses one of the invocations of that literal – say, in another file like `user.rb`, you might not find out about it until the exception surfaces in your runtime.

You can prevent that from happening by moving these string literals to constants, and then referencing those in place of the literals themselves:

```rb
class Action < ApplicationRecord
  module Type
    ACCEPT = "accept"
    REJECT = "reject"
    REQUEST_CHANGES = "changes_requested"
    MAKE_BETTER = "improvements_required"
    RUBY_PRETTIER = "improve_readability"

    ALL = [ACCEPT, REJECT, REQUEST_CHANGES, MAKE_BETTER, RUBY_PRETTIER]
  end

  scope :accepted, -> { where(type: Type::ACCEPT) }
  scope :rejected, -> { where(type: Type::REJECT) }
  scope :requested_changes, -> { where(type: Type::REQUEST_CHANGES) }
end
```

You can even declare these constants within the array literal `ALL`, and have access to the individual strings and collection, all from one terse declaration.

```rb
class Action < ApplicationRecord
  module Type
    ALL = [
      ACCEPT = "accept",
      REJECT = "reject",
      REQUEST_CHANGES = "changes_requested",
      MAKE_BETTER = "improvements_required",
      RUBY_PRETTIER = "improve_readability"  
    ]
  end

  # ...
end
```

In your terminal:

```sh
 2019-03-03 15:33:33 ⌚ ruby 2.6.3p62 Newtons-Mac in ~/workspace/my_great_app
±  |master ✓| → rails console
Running via Spring preloader in process 90221
Loading development environment (Rails 5.2.3)
irb(main):001:0> Action::Type::ACCEPT
=> "accept"
irb(main):002:0> Action::Type::ALL
=> ["accept", "reject", "changes_requested", "improvements_required", "improve_readability"]
```

After that refactor, you'll also get tab completion in your IDE of choice. Bonus. 👍

Now go forth, and dev greatly ✨🐶✨
Clean local GIT branches
Tags: git, sprint, automation
Published: 2019-08-16 16:57:35

To clean all of your local branches except the current `HEAD`, `master` and `staging`, you can use this script:

```sh
git branch | grep -v "master\|staging" | xargs git branch -D 
```

You can add more branches to the list of the ones that you want to skip, for example if you wanted to keep `dev` branch in addition to the current branch, master and staging:
```
"master\|staging\|dev"
```

To further automate this, you can add an alias to your terminal by modifying your `~/.bash_profile` file:

```sh
...
alias clean-branches="git branch | grep -v \"master\|staging\" | xargs git branch -D"
...
```
Now, when you're within the project directory, you can use `clean-branches` command to perform this trimming automatically.

Enjoy!
[Video] Conversational Semantics for the Web
Tags: video, javascript, voice, cascadiajs2018
Published: 2019-08-16 16:42:42

---
title: [Video] Conversational Semantics for the Web
published: true
description: Over time, your users will become more accustomed to and reliant on voice-based interactions with their computers and, thereby, the web. Enabling them to complete critical tasks without a visual user interface will be crucial for the long-term success of your website. In this session, Aaron Gustafson will discuss how smart markup choices can improve the overall usability and accessibility of your projects without disrupting your current workflow.
tags: video, javascript, voice, cascadiajs2018
---
*As we lead up to [CascadiaJS 2019](https://2019.cascadiajs.com), I'm going to share the 24 amazing talks from 2018 here on dev.to. Sit back and enjoy the show!*

# Aaron Gustafson
![Aaron Gustafson](https://2018.cascadiajs.com/speakers/gustafson.jpg)

Over time, your users will become more accustomed to and reliant on voice-based interactions with their computers and, thereby, the web. Enabling them to complete critical tasks without a visual user interface will be crucial for the long-term success of your website. In this session, Aaron Gustafson will discuss how smart markup choices can improve the overall usability and accessibility of your projects without disrupting your current workflow.

[Watch the talk on YouTube (31:51)](https://www.youtube.com/watch?v=gZiysmuwwMA)
Validando CEP com RegEx
Tags: javascript, react, node
Published: 2019-08-16 16:34:43

![Validando CEP com RegEx](https://thepracticaldev.s3.amazonaws.com/i/n32ra846qfcbqnzlelqj.jpg)


Você pode usar expressão regular para validar um número de CEP de forma rápida e fácil. 

Uma outra forma de criar essa mesma função usando uma sintaxe mais curta:

```js
const isValidBRZip = zip => /^[0-9]{5}-[0-9]{3}$/.test(zip);
```

Espero que tenham gostado!

Não deixe de visitar o repositório do github com todas as dicas em emersonbrogadev/social-media-snippets.

[➜ Participe da nossa lista de desenvolvedores](https://emersonbroga.com/e/participe/)
[➜ Aprenda ES6](https://amzn.to/2J4XnLg)
[➜ Veja as dicas no Instagram](https://www.instagram.com/emersonbrogadev/)
[➜ Assita nosso canal no YouTube](https://www.youtube.com/c/emersonbroga/)
[➜ Curta nossa página no Facebook](https://www.facebook.com/emersonbrogadev/)
[➜ Não perca as atualizações no Twitter](https://www.twitter.com/emersonbrogadev/)
[➜ Veja os repositórios no Github](https://www.github.com/emersonbrogadev/)

=)
PWA Icon Generator
Tags: pwa
Published: 2019-08-16 16:12:24

Recently I was working on PWA website and I faced a big problem with the different sizes of home screen logo and splash screen on IOS devices, so I wrote a small script to avoid the headache of resizing the logo to the appropriate size, it aims to help to generate the logo to various sizes.

the script includes generating images for IOS splash screen and write all the tags to HTML file. it's ready just update the var `iconPath` to be the location for your logo

I'm sorry because it's not that good, actually, I don't have enough time to make it a plugin, whatever, feel free to use it for any good thing.

Just download it and run it with `node`


Link => https://github.com/ezzabuzaid/pwa-icon-generator
How Job Posts Tell You More Than You May Think
Tags: career, devrel, developerrelations
Published: 2019-08-16 15:56:15

---
title: How Job Posts Tell You More Than You May Think
published: true
description: Learn more about your product/framework/language and dev community by diving into open job postings.
tags: career, devrel, developerrelations
cover_image: https://thepracticaldev.s3.amazonaws.com/i/s62vjt2pfrtri2eqka70.jpg
---

I'm one of those obnoxious people that will answer questions with questions. 

Them: "How do I make this work?"
Me: "What have you tried?"

Them: "How do I learn about AI?"
Me: "What is your learning style?"

Them: "How do I get a job at my dream company?"
Me: "Have you taken a look at their open requisitions?"

Now if you were with me until that last set and got confused, let me explain.

**Companies tell their secrets in who they are hiring with what skills.**

If this is surprising to you, it was to me too at one point. Now its easily one of the best tools I have in my soothsaying toolbox.

Job posts may:

* Describe the exact skills you need, plus more bonus skills, for said job
* Give you an overview as to what the company is looking to do
* Inspire you to write better job posts yourself
* Show you that you need a new job

But have you thought about how job posts also tell you:

* Who is using your product, maybe even how
* Who is evaluating your product
* Who your competitors are
* Who your developer community may look like

Hold on, am I suggesting you get on job searching engines and destroy your personal algorithm by searching for roles that may apply to the product, language, or framework you are working on?

YES. 

Is LinkedIn going to send you recommendations that may not make a ton of sense to your personal career path?

YES.

Are you going to be able to build a persona that may be less influenced by your existing internal ideas?

I mean probably. Depends how easily you are swayed.

My point is, if you have questions that range from competitive analysis to "is Cobol really worth learning anymore?", I highly recommend sitting down with LinkedIn, Glassdoor, Indeed, and other job search engines and looking around. This is incredibly powerful data that can help you understand what skill gaps companies have today, where your product or language sits among its competitors, and how some roles were rebranded (looking at you data scientist). 

I'm in the process of building out some developer personas to guide discussions I'm having internally about our devrel strategy. I've included data from open job posts, questions and profiles I've seen on forums, and how competitors have made their products available. Let me know if you want a post about it. Happy to share my steps to help others!

Have you used job postings for something other than job seeking activities?
What would your opinion be of a "reading position" indicator on DEV?
Tags: meta, help, discuss
Published: 2019-08-16 15:38:26

We have this open PR and I'd love to hear opinions on the value of a feature like this:

{% github https://github.com/thepracticaldev/dev.to/issues/1626 %}

This is the example:

![](https://user-images.githubusercontent.com/5699145/51559460-38db7900-1e82-11e9-9882-6cffd10a970e.png)

My only _technical_ concern here would be ensuring it doesn't add jankiness to the scrolling behavior, but otherwise this is more of a UX discussion.

Feel free to weigh in.
What was your win this week?
Tags: discuss, weeklyretro
Published: 2019-08-16 15:36:42

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

👋👋👋👋

Looking back on your week -- what was something you're proud of?

All wins count -- big or small 🎉

Examples of 'wins' include:

- Getting a promotion!
- Starting a new project
- Fixing a tricky bug
- Cleaning your house...or whatever else that may spark joy 😄

![dancing-snoopy](https://media.giphy.com/media/rgq4Sar77s85W/giphy.gif)

Happy Friday!
My first portfolio is now LIVE!!
Tags: newdev, portfolio, skillpathway
Published: 2019-08-16 15:20:37

---
title: My first portfolio is now LIVE!!
published: true
cover_image: https://thepracticaldev.s3.amazonaws.com/i/1nlot0nq5nx9a09hjb6q.jpg
tags: newdev,portfolio,skillpathway
---
A very big thank you to the [Skill Pathway](https://skillpathway.thinkific.com/courses/frontend-development-crash-course) team for this great course that walked me through building my first portfolio. I'll definitely continue to improve this site as I gain more skills and also purchase a custom domain when in future. For me, I learnt a lot about bootstrap and also how to write SCSS. Even if I don't have any world-class project on my portfolio yet lol.

I feel on top of the world. I'm dreaming of my portfolio redesign blog post already and I am very sure by that time, I would have great projects to showcase because I never stop learning.

Please check it out [here](https://dev-alawish.netlify.com/) and tell me how I can make it even better. Thanks so much 🙏.
dbExpress Drivers Now Support 64-bit versions of macOS and Linux
Tags: delphi, databaseconnectivity, dbi, drivers
Published: 2019-08-16 14:51:02

---
title: dbExpress Drivers Now Support 64-bit versions of macOS and Linux
published: true
description: Devart released the new versions of dbExpress drivers with support for the 64-bit macOS and Linux operating systems.
tags: Delphi, database connectivity, dbi, drivers
---

*Devart released the new versions of dbExpress drivers with support for the 64-bit macOS and Linux operating systems.*

![dbExpressDrivers](https://i.ibb.co/MN3d0CR/db-Express.png)

Devart, a recognized vendor of professional database management software for developers and DBAs, released updated versions of its [dbExpress drivers](https://www.devart.com/dbx/) with support for macOS 64-bit and Linux 64-bit. The new dbExpress drivers can be particularly useful in light of the upcoming macOS update.

The main updates in this release of dbExpress drivers:

**Support for macOS 64-bit** — the release addresses potential challenges that  developers of 32-bit database applications may face when Apple drops support for 32-bit applications in macOS 10.15
**Support for Linux 64-bit** — now users can also compile Delphi apps powered by dbExpress data access technology using the Embarcadero compiler for the Linux platform.
Devart dbExpress Driver is a lightweight, cross-platform interface for accessing data from SQL database servers such as Interbase, Oracle, or MySQL in Delphi and C++ applications. The key benefits of Devart cross-platform dbExpress technology are direct access to database servers using native libraries and data type mapping between database and Delphi data types.
For more information about Devart dbExpress Driver, please visit — https://blog.devart.com/dbexpress-drivers-for-macos-and-linux-64bit.html

**About Devart**

Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.
For additional information about Devart, visit https://www.devart.com/
Impact of technical debt on health
Tags: anxiety, legacy, technicaldebt, health
Published: 2019-08-16 14:27:58

---
title: Impact of technical debt on health
published: true
description: What impact does exposure to technical debt have on a developers health?
tags: #anxiety #legacy #technical-debt #health
cover_image: https://thepracticaldev.s3.amazonaws.com/i/12sbeds48ira7hh1e7d1.jpg
---

As soon as a developer writes one line of code, it needs to be dealt with later. It either gets deleted or maintained.

In case it gets maintained, a developer gets confronted with it later, time and time again. It could be you, it could be your (future) colleague.

We now understand that choices we make today will impact the quality of the system and the project later. The better we make these choices, the less technical debt we incur.

Often we know we could do better, when more time or budget would have been provided. We cut corners.

Each time we see bad (or less optimal) code we get the urge to improve it. At least I do. If the application is bad, the urge is huge. If the application is horrendous the urge is getting even painful.

My question is, is this anxiety healthy? I reckon, no form of anxiety is healthy and being exposed to such technical debt each day is very unhealthy.

If I see such bad code I want to change it. I want to change it now, until it is out of my sight. But I can't. Do you relate?
VirtualBox: Configuring "Host Key"
Tags: virtualbox, prereferences, hostkey, howto
Published: 2019-08-16 14:05:23

---
title: VirtualBox: Configuring "Host Key"
published: true
description: VirtualBox provides various function with Host Key such as switching between host and guest or taking screenshots. The default of Host Key is "Right Ctlr", whereas some keyboards don't have the key. In such a case, we can change the mapping with Keyboard Settings in Prereferences.
tags: virtualbox, prereferences, host key, howto
---

[VirtualBox](https://www.virtualbox.org/) provides various function with Host Key such as switching between host and guest or taking screenshots.

The default of Host Key is "Right Ctrl", whereas some keyboards don't have the key.
In such a case, we can change the mapping with Keyboard Settings in Prereferences:

![keyboard settings](https://thepracticaldev.s3.amazonaws.com/i/al74xp25t9vcu7m3lqxq.png)

Just focus on the "Shortcut" area of "Host Key Combination" and type the key which you want to set as Host Key.

Besides, when you have run the virtual machine already, it's still possible to configure it by doing right click at the right bottom of the guest window:

![guest window](https://thepracticaldev.s3.amazonaws.com/i/fjngu4iodb9o2fnvxo9h.png)

Thank you for your reading 🦔
Happy computing.
Daily Challenge #42 - Caesar Cipher
Tags: challenge
Published: 2019-08-16 13:32:06

---
title: Daily Challenge #42 - Caesar Cipher
published: true
series: Daily Challenge
description: Write a function that will hide a string using the Caesar Cipher.
tags: challenge
---
A Caesar cipher, or a shift cipher, is one of the most well known encryption techniques. It works by substituting the letters in the message with letters some fixed number of positions down the alphabet. 

Your challenge is to write a function that will accept a string and a shift key. It will return the encrypted text. If something in the string is not in the alphabet (e.g. punctuation, spaces) leave it as is. 

key: 1
plain:  defend the east wall of the castle
cipher: efgfoe uif fbtu xbmm pg uif dbtumf

**Bonus**
Write a function that will crack the cipher without knowing the shift. The shift key can only be in range of [1, 26]. 

`key: 3`
`cipher: dwwdfn iurp wkh zrrgv dw gdzq`
`plain: attack from the woods at dawn`


I've used the brute-force method before (printing every possible key and manually searching for the right one). I can't wait to see other solutions to cracking this easy cipher. 

Good luck!

***
_Want to propose a challenge for a future post? Email **[yo+challenge@dev.to](yo+challenge@dev.to)** with your suggestions!_
Help: Vehicle health analysis using Python
Tags: discuss, help, datascience, machinelearning
Published: 2019-08-16 13:19:38

Is anyone who has ever worked on or know of a Python project that does either one of the following:

- Vehicle health analysis/prediction or,
- Driving patterns recognition/analysis from a vehicle's `ECU`?

I recently got my hands on an OBD2 adapter and would like to connect it to a RPi to gather data and hopefully do some analysis.
Garbage collection - explain it like im 5 request (language agnostic)
Tags: explainitlikeimfive, programming, garbagecollection, optimisation
Published: 2019-08-16 13:18:35

---
title: Garbage collection - explain it like im 5 request (language agnostic)
published: true
description: 
tags: explainitlikeimfive, programming, garbage collection, optimisation
---

I have been looking for an article about Garbage collection for junior developers, to give a high level overview of what it is, why we need it, how it works. I have been unsuccessful in my search. 

So I invite everyone to comment their best "explain-it-like-im-five" descriptions of garbage collection. Or anything more detailed for a junior dev would be great!
Generate jooq classes using docker containers
Tags: java, docker, liquibase, jooq
Published: 2019-08-16 13:06:09

Tech stack - #java, #maven, #liquibase, #docker

# Why?

I will talk about what we did to achieve below things,

1. Generate jooq-classes from an in-memory or Adhoc database instead of connecting to prelive/live environments.

2. How to apply all the migrations using liquibase before generating jooq-classes.

3. Generate jooq-classes based on Postgres driver. Jooq supports generating classes connecting to h2 (in-memory database) but not Postgres. We use Postgres mostly and h2 mostly does not support many features Postgres has.

4. Avoid using multiple maven plugins and 100 lines of code instead use one maven plugin.


# What we did

1. Start "Test-containers" during maven pre-compile stage. (https://www.testcontainers.org/#about)

2. Apply liquibase migrations over the test-container.

3. Generate jooq-classes based for the schema provided.


# Where can I find

{% github jango89/jooqgen-liquibase-postgres %}
FIGHT FRAUD! As a C# .NET full stack Developer
Tags: career, hiring, dotnet
Published: 2019-08-16 12:47:35

Join FRISS, the European leader in anti-fraud detection software, to reach his Big Hairy Audacious Goals!

We are looking for a new full stack developer (exp 0-3) to join our HQ in Creative Valley, Utrecht.
We can help you with Visa sponsorship and relocation, other than free boot-camps, chocolate and the possibility to join our football club and rule the local championship!

You can find more about this opportunity here:
https://jobs.friss.com/vacancy/fight-fraud-as-a-c-net-software-developer/