teleren/devto huggingface dataset:
Choosing the technology for my new side-project
Tags: sideprojects, career
Published: 2021-02-06 17:15:30

In my day job I work as a backend developer using PHP with the Laravel framework. While I enjoy my work, it's not the same as doing programming for a hobby, which is why I like working on side-projects. With side-projects I get to decide how the product will look like, which technology I use and I also get to do front-end development. 

How I got the idea for my new project: I'm an avid language learner. Apart from English, I also speak German, French, Mandarin, Korean and I'm learning Spanish. While watching my children play a game I got the idea to program that game and give it a language learning twist. I might write more about it in another post. 

In this post I'm going to concentrate on the technology I chose. Although I do side-projects for fun, I also see the benefit they have for future job applications. One gets to learn new technologies and it comes in handy if a company asks one to share some personal code for evaluation purposes. 

So I think a side-project should use technologies one is already familiar, but one ideally also adds some technologies one wants to learn. 

Ok, here's the list:

Laravel: Of course I chose this, because it's what I already use on a daily basis. In my previous Laravel side-project I used blade views for displaying the data. This time I'm going to create an API as we do at work, so that front-end and backend are separated. 

GraphQL: I'm not sure yet about this one. I've never done anything with GraphQL, but it's something I would like to learn. So at the very least I'm going to find out if GraphQL can at all be used for my project or if my project is too small for it's use.

VueJS: I've used a little bit of VueJS before for a simple dashboard I created, but there is definitely still a lot to learn. I'm also a bit familiar with React. But I like Vue better. Vue integrates nicely with Laravel so it's what most Laravel projects seem to use (my company does). 

TypeScript: I've used TypeScript a few years ago with an AngularJS project. I think it will help with keeping my code clean. It will be my first time to use it in connection with VueJS.

Tailwind: Never used it, but I think it will help give some structure and consistency with the layout. Looking forward to learning it.

Deploying with Docker: At first I was excited about Laravel Sail as it runs Laravel in a Docker Container. But then I realized that it doesn't setup a webserver, but just runs using the PHP server and hence it's not to be used in production. So I'll need to create my own Docker container. I'm most familiar with Apache, but this will be a good chance to learn to work with Nginx.

I plan to write more about how things go with developing my side project and what I'm learning, so in order to stay posted, please follow.
Quazar Graphic OLED Display - Real Pixels for your RC2014
Tags: rc2014, programming, z80, computer
Published: 2021-02-21 22:19:32

---
title: Quazar Graphic OLED Display - Real Pixels for your RC2014
published: true
date: 2021-02-06 17:00:00 UTC
tags: rc2014, programming, z80, computer
canonical_url: https://ncot.uk/z80-homebrew-computer/quazar-oled-display-real-pixels/
---

## Real Pixels?

One of the main limits with most hobby Z80 based computers is their lack of any video output. Most video output comes in the form of ASCII text sent to a serial console. This is fine if you like text based software or are running an operating system like CP/M. It’s a bit limiting if you want to do more graphical things.

I found the [Quazar Graphic OLED Display](https://2014.samcoupe.com/), a plug in board for the RC2014 with a small 128x32 pixel OLED display on it. By using a fairly straight forward set of assembly routines it’s possible to send image data to the screen.

## Video

I liked it so much I made two videos about it. Watch them here!

[First video](https://www.youtube.com/embed/Q10f_q6tQno)

[Second video](https://www.youtube.com/embed/qtZ0iyk-4Ts)

## How the Quazar OLED Display works

The display has fairly simple electronics that interface the OLED to the Z80 bus, with it having an I/O port assigned to it by some jumpers. The board came pre-assembled so all I had to do was plug it into a spare slot on my RC2014 backplane.

The rest was done in software using a mixture of Z80 assembly language and C. For the C programming I used the popular cross-compiler for Z80 [Z88dk](https://github.com/z88dk/z88dk)

## Grab the source code

You can get the source code for this from my [Github repo](https://github.com/ncot-tech/rc2014-quazar-oled). There’s not much to it and all the assembly code came straight from the excellent manual provided with the OLED display.

## How To Program The Quazar Graphic OLED Display

### Step 1 - Draw some pictures

I used a combination of [Paint.NET](https://www.getpaint.net/) and [Irfanview](https://www.irfanview.com/) to draw and convert the images. All I did was set the canvas size to be 128x32 pixels and draw in solid black and white. Irfanview was used to convert the image into PBM so that I could use a bit of C to convert that into source.

You can do anything you like to convert pixels into source code, but the screen expects its pixels in a specific and slightly weird format. Each byte of image data represents an 8 pixel column on the display, with the display being made up from four rows of these 8 columns, with 128 columns per row. There’s a diagram in the manual, stare at it for a while until it makes sense.

### Step 2 - Write the code

In my github repo is a Z80 assembly file containing the rudimentary API based off the manual’s source. It takes a 512 byte array and sends it to the screen as image data. If you got all your bits in the correct order, an image appears. If not, a garbled mess does.
Job Expectations for Senior Software Engineers in 2021
Published: 2021-02-06 16:43:02

In January, I conducted approximately 90 interviews for the position of Senior Software Engineer. The market for interviews is red hot right now. 

**Summaries**
- The skills required are *highly* dependent on the company interviewing you. Study before the interview knowing what tech stacks are used.
- The pay ranges are $55 - $70  USD/hour. 
- Tests are required in 85% of interviews.
- Working Remotely is favored today. Some are planning returns to the office.
- You must have Azure or AWS cloud experience.
- React is popular for sure, but Angular is still in major demand.
- Backends using ASP.NET Core or .NET 5.0 are plentiful. 

**Rejections**
Some reasons for rejections were communicated, here's a few
- No graphQL
- No Azure pipelines
- No AWS cloud
- No CosmosDB
- Failed Tests

**Thoughts**
Today's Senior Software Engineer (SSE) is expected to know everything within the Software Work Flow, not just the coding parts.

Unlike the past where Database, Security, and Systems Teams all were their own department. Today, with the cloud, the SSE is expected to know those areas too. This is on top of knowing both front and back-ends extremely well.

**Tips**
Study, Study, Study.

JWP2021
Measure what you are learning by time, not for getting it all  the first time. 
Tags: learning
Published: 2021-02-06 16:31:51

Pomodoro.

You probably have heard that word before and also know what is about. Well is a productivity technique use do get results and progress during a task. When I began learning to code I used feel very bad sometimes because I was not understanding what I was learning or because I was really far away from finishing the book or the tutorial. That can hold you back and me you feel you are not moving forward.

So I started using the Pomodoro technique but with a little mindset tweak. I would start studying for 25 minutes and each time I finish one Pomodoro I would feel I achieve something. Maybe I did not get everything of what I was learning the first time or maybe I did not finish the lesson but I finished the 25 minutes. I would do it again and again. At the end of the day I had lots of repetitions and when you repeat your brain start to make the connections you need to stick knowledge. 

Is powerful. Use it wisely.
What is the !! (not not) operator in JavaScript?
Tags: javascript, angular, node, typescript
Published: 2021-02-06 16:30:38

Converts Object to boolean. If it was falsey (e.g. 0, null, undefined, etc.), it will be false, otherwise, true.
```javascript
!oObject  // inverted boolean
!!oObject // non inverted boolean so true boolean 
```
## Representation
So !! is not an operator, it's just the ! operator twice.

## Example : 
```jsx
<CustomModal
  disabled={isDisable}
  title="Delete"
  children="Are you sure you want to delete ?"
  onCancel={() => setDataToDelete(null)}
  onConfirm={() => {}}
  show={!!dataToDelete} //show only accepts boolean
/>;
```
Your experience counts
Tags: career, education
Published: 2021-02-06 16:27:34

On my journey from designer to [becoming a developer](https://www.falldowngoboone.com/blog/on-changing-careers/), I often wondered if I needed a Computer Science degree. This is also one of the most common questions I get from others looking to jump into development from another career.

I began college as a Drama major and eventually switched to a Communications degree with an emphasis in Film and Broadcast. Then I went into graphic design. Not exactly the straightest path to software engineering.

For a long time, I allowed my lack of formal development education to be a source of insecurity. No matter what I accomplished or what I learned, I always felt like I was missing something. It fueled my appetite for growth, but it robbed me of my confidence.

Something that I realized as a designer, though, was even though I didn't have a formal education in a particular field of study, the education and experience I had acquired up to that point was more relevant than I initially thought. I began reframing the idea that I had no applicable experience into the idea that all experience counts.

In acting, I learned to put myself in the shoes of another person, useful for testing interfaces and writing readable code. In film school, I learned how to tell a story, something that's useful in crafting version control commit history and interpersonal communication. Finally, in design, I learned how to build systems that scale, which is invaluable to creating software architecture.

There are many different paths to becoming a software developer. Whether or not you should get a Computer Science degree is really something only you can answer. I didn't need one to become a developer, but the process of getting one can help you choose what field of development you want to pursue.

I think the important takeaway from this is, if you're struggling with insecurities about a lack of education, look at what you do have. Start to bridge what you know and what you've done to what you want to do. Chances are your experiences and interests already have a common theme and share a common skillset. 

Your experience counts more than you think.

What has your journey looked like? Has it been as roundabout as mine? Or maybe even more...unconventional? [I would love to hear all about it](https://twitter.com/therealboone).

Thanks for reading. Until tomorrow!
Import Both Default and Named Exports
Tags: javascript, webdev, modules
Published: 2021-02-06 16:21:15

---
title: Import Both Default and Named Exports
published: true
tags: ['javascript', 'webdev', 'modules']
canonical_url: https://chan.dev/posts/import-both-default-and-named-exports/
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/rwppmxkmbwwmfgtcnjap.jpg
---

We can mix and match import styles to keep code tidy and direct.

The code below imports both the default export (as `cheesburger`) as well as all named exports.

```js
import { default as cheeseburger, bun, cheese, patty,} from "./cheeseburger.mjs";
```

We can tidy it up a smidge by splitting the default export and named export import statements — using a comma.

```diff
- import {
- default as cheeseburger,
- bun,
- cheese,
- patty,
- } from "./cheeseburger.mjs";
+ import cheeseburger, { bun, cheese, patty } from "./cheeseburger.mjs";
```

This eliminates the need to rename the `default` on import with `as`.

## What mixed imports are not [#](#what-mixed-imports-are-not)

The import position of default and named exports cannot be swapped. When mixing the two, it's always default first then named exports.

When I first saw this syntax, I assumed that every comma was like a repeaet — a new opportunity to assign local variables. That's not how it is. One comma, after the default, and before the named.

## Go pro [#](#go-pro)

This is part of a course I'm building on modules at [lunch.dev](https://www.lunch.dev/).  
When live, members get access to this and other courses on React.

<script src="https://cdn.podia.com/embeds.js" async="async"></script>[Join lunch.dev for videos](https://www.lunch.dev/member)
I released my first book: How to use const in C++
Tags: books, watercooler, cpp
Published: 2021-02-06 16:05:02


I've got some great news to share with you. Based on my series on [when to use `const` in C++](https://dev.to/sandordargo/series/9533), I wrote a book on the same topic and I released it on [LeanPub](https://leanpub.com/cppconst/)!
<!--more-->

![Book cover](https://dev-to-uploads.s3.amazonaws.com/i/b7hpielitjjvwuk5b61p.jpg)

In the book, I discuss the idea of constness which is so important that in certain languages entities are `const`, in other words, immutable by default. If you want to become a seasoned C++ developer, you must understand how you can use `const` correctly. In this book, you'll learn when and how to use it in the different contexts it might appear:

- `const` functions
- `const` local variables
- `const` member variables
- `const` return types
- `const` parameters

Compared to the series of articles, the book contains extra code examples, more explanations and also the differences between *`const` west* and *east `const`* - without starting a holy war on different coding styles.

If you are interested, check it out [*How to use const in C++* on LeanPub](https://leanpub.com/cppconst/)
`Eval`ing twice to define toplevel module from String
Tags: ruby
Published: 2021-02-06 15:54:37

---
title: `Eval`ing twice to define toplevel module from String
published: true
description: Ruby, so weird :)
tags: Ruby
//cover_image: https://direct_url_to_image.jpg
---

Sometimes we want to define modules using `String` and `instance_eval`.

```ruby
class A
end

code = <<-CODE
  module B
    module_function
    def b
      puts 'b'
    end
  end
CODE
a = A.new
a.instance_eval code

B.b # => Should print 'b'
```

However, this code causes `NameError` saying `uninitialized constant B`.

Where has it gone? To know where module B is defined, we use `ObjectSpace` class.

```ruby
# Replace `B.b` in the snippet above with this
ObjectSpace.each_object(Module) {|m| p m if m.name =~ /::B/ }
# => You see something like "#<Class:0x00007f861b8c8e50>::B"
```

OK, with `instance_eval` and String combination, the defined module is put in Anonymous class namespace, the way which we don't like. How to define a toplevel module with `instance_eval`?

So here's the answer.

```ruby
class A
end

code = <<-CODE
  module B
    module_function
    def b
      puts 'b'
    end
  end
CODE
a = A.new
a.instance_eval do
  eval code
end
B.b # => "b" is printed
```

What happened? We eval `code` string in `instance_eval` block. I don't know why but this code just does what we want to do.
The Reality of life 
Published: 2021-02-06 15:38:39

In reality of life, the people around us changes.Same to us we change the way we we're treated. The only thing that is consistent is  the endless changes of things around us. Its hard to be always like running just to be aligned with this changing world. We can always adapt on this changing environments, its a matter or choice.We choose the way we respond on things around us. But be mindful of what you choose
Why Software Engineering?
Published: 2021-02-06 15:29:46

System.out.println("Hello")
puts "My name is Jean."
print "Nice to see you"

 I learned Java last few years and I am learning Ruby and Python nowadays. Every language seems similar but different. It's interesting to learn how each language works. I enjoy the ability to create an actual working, moving program from lines of code. It’s really fascinating that everything associated with programs on computers work through lines of code. 
 
 Coding is sometimes challenging. It's like a puzzle. Sometime, I stuck whole day to try to figure out how to make it work and try to make it more efficient. I really enjoy the journey of trying to figure out how to make a program work. I'm over the moon when the program that I worked on whole day finally working! I bet all the programmers feel the same:)

"Welcome every problem as an opportunity. Each moment is the great challenge, the best thing that ever happened to you. The more difficult the problem, the greater the challenge in working it out." - Grace Speare, Author

 As the technology industry growing, computers have become a major part of our lives today. Privacy and security are becoming major concerns as well. In the future, I want to contribute to making a safe networking environment for people when they use their computers.

P.S. this is my first blog. I hope you have more understanding about me.
Error: Could not find or load main class
Tags: java, debug
Published: 2021-02-06 15:22:25

![alt text](https://dev-to-uploads.s3.amazonaws.com/i/81vtkd83u4i730r899se.png)
 

While trying to execute java code via command-line you may have encountered the above error quite commonly (if you declare your class as a part of some package)
## What is package?
Packages are containers for classes that are used to keep the class name space compartmentalized. For example, a package allows you to create a class named List, which you can store in your own package without concern that it will collide with some other class named List stored elsewhere. 

## Finding packages
How does the Java run-time system know where to look for packages that you create? 
The answer has three parts. First, by default, the Java run-time system uses the current working directory as its starting point. Thus, if your package is in a subdirectory of the current directory, it will be found. Second, you can specify a directory path or paths by setting the CLASSPATH environmental variable. Third, you can use the -classpath option with java and javac to specify the path to your classes.
In this read I will focus on the most easiest way, i.e. first one 
### The Demonstration :-
1>	Checkin into your development directory in my case this is
 C:\Users\omgill\Desktop\Java
2>	The easiest way is to simply create your package directory below your development folder.

![alt text](https://dev-to-uploads.s3.amazonaws.com/i/zkba5sez6i5zln4qcuoc.png)
 
3>	 Now put your .java file into the package directory complie the code .
CAUTION: make sure that all the .class files are placed in the right folder/directory. 

![alt text](https://dev-to-uploads.s3.amazonaws.com/i/0omanuquvlub76lkt4va.png)

 4>	Then execute the class using the command:
                java <package-name>.<class-name> 

![alt text](https://dev-to-uploads.s3.amazonaws.com/i/tj0q1kedr5rpvbceaw3y.png)
 
and that's that. :)
Form Events
Published: 2021-02-06 15:20:42

#Events Inside Forms
Events inside forms are exactly what they read. Its an even that happens by interacting with the inside of a form

#Submit Events
Submit events are events in a form that turn in information from it, like a username and password.
there would be a lot of HTML here so am just going to put the JavaScript and explain what the HTML is
```JavaScript
const form = document.querySelector('.signup-form')

form.addEventListener('submit)
```
so all we have right now is that it notices when you submit something but it wont tell you what it submits because it reloads 
so lets make it not reload were also going to make it store a username from the form
```JavaScript
const form = document.querySelector('.signup-form');

const username = document.querySelector(#username);

form.addEventListener('submit', e=> {e.preventDefault});
```
so as I said this code will now save the username and not reload the page which the e.preventDefault will do (for not reloading) and the username const saves the username
we can see what the username is by just typing 
```JavaScript
console.log(username.value)
```

#Testing RegEx Patterns
now we're going to learn how to use patterns to make sure the usernames are correct
so lets make a pattern to make it so that you cant add special characters and it has to be a certain number of letters long
```JavaScript
const pattern = /[a-z] [6,]/
let result = pattern.test(username)
```
this will make the pattern saying it needs to only be letters and have more than 6
Announcing Chaos Carnival: A free virtual conference on Chaos engineering
Tags: cloudnative, conference, chaosengineering, chaosengineeringbootcamp
Published: 2021-02-06 15:17:34

We are happy to announce the launch of Chaos Carnival, a virtual Free-to-Attend Cloud-Native Chaos Engineering focused conference happening on Feb 10-11, 2021. This conference is aimed towards bringing all the Chaos engineering experts together to share their experiences and learn from each other.

**So, what is Chaos Engineering exactly?**

As our systems grow more and more complex with the adoption of microservices and cloud architectures, it becomes harder and harder to forecast unprecedented failures. A single unforeseen breakdown can cost companies millions of dollars. The solution to this threat is in identifying failures proactively before they materialize in real-time. How do you do this? Chaos Engineering!

Chaos engineering is an approach where you deliberately ‘break things’ to understand how to make a more resilient system that can withstand unstable and unpredictable conditions. You test, verify and prepare your application to deal with real-time disruptions.

With Chaos Engineering, companies can avoid costly outages by testing the system’s ability to endure breakdowns without compromising the quality of services. Chaos engineering allows you to uncover new weaknesses beforehand that might end-up crashing the system altogether, thereby causing real-time disruptions. It also allows you to test how your system will behave under pressure. 

With the rise in adoption of DevOps practices across big organizations, Chaos Engineering is rapidly becoming a norm to ensure that the applications can keep up with frequent releases without going down. 


**Why Chaos Carnival?**

We see Chaos Engineering as one of the trending technologies for 2021 and want to present the community with a vendor-neutral platform for discussing all things chaos engineering. 

The keynote for this inaugural episode of the conference will be kickstarted by [Adrian Cockcroft](https://twitter.com/adrianco?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor) from AWS, who has been a well-known personality promoting Chaos Engineering in the last few years. 

Chaos Carnival is a community-driven event, centered around cloud-native chaos engineering. 

Why should you attend?

Hear from experts, innovators, and industry leaders that are shaping the Kubernetes ecosystem.
Discover new chaos engineering tools and talk to the makers directly.
Attend chaos engineering Bootcamps and learn chaos engineering 101 and experience it
Receive actionable takeaways to help you implement Chaos Engineering in your organization.
Continue to be part of the Chaos Carnival [Slack](https://join.slack.com/t/chaoscarnival/shared_invite/zt-jy0q3xxc-EIYmlEXqvqbRRxYQkvdRpw) community, learn from your peers, and stay up-to-date even after the conference.


**Register Now for Free at - [chaoscarnival.io/register](https://chaoscarnival.io/register)**