teleren/devto huggingface dataset:
How to create a simple registration form in ASP.NET using C# and SQL Server
Tags: aspnet, beginners, webdev, coding
Published: 2018-01-21 06:55:08

---
title: How to create a simple registration form in ASP.NET using C# and SQL Server
published: true
description: In this tutorial, we will explain how you can create a simple ASP.NET registration form in ASP.NET using C# and SQL Server database. 
tags: #asp.net, #beginners, #webdevelopment, #coding
---

**Original article published here:** [ASP.NET Registration form using C# and SQL Server database](https://codeitbro.com/how-to-create-asp-net-registration-form/).

![alt text](https://thepracticaldev.s3.amazonaws.com/i/vx1hmc5sr3wcaut5ymsl.png "ASP.NET Registration form using C# and SQL Server database")


**The logic behind the ASP.NET Registration form:**

There is no rocket science involved here – users will simply enter their details like email, first name, last name, and other details on the registration form. After that, they will click on a button to register themselves on your site.

**What actually happens when the code runs:**

Users will enter their details in the user registration form and hit the Register button. After that, a connection to the database will be established and a SQL Insert query will be executed to store all user inputs in the user details table.

**Here is the breakdown of the complete process:**

1. Creating an empty ASP.NET website.

2. Designing the user registration form.

3. Adding a SQL database to the project in which we will create a table to store user details.

4. Configuring web.config file.

5. Code the backend of user registration form.

6. Try and test the application.

Read each of these steps in details by following the tutorial link above. 

Cheers :) Let's code!
10 Reasons to Blog
Published: 2019-04-19 17:16:43

---
title: "10 Reasons to Blog"
published: true
tags: 
canonical_url: http://www.geekytidbits.com/2018/01/21/10-reasons-to-blog.html
---

I have been blogging for just over 8 years and recently thought about why I continue to blog. It’s entirely by choice, after all, but I keep doing it and here are 10 reasons, in no particular order, why:

1. **Help others** - you get to help others learn the things you’ve learned. It feels good to share with others and help them along
2. **Help your future self** - your blog is a great place to post things you want to reference yourself in the future
3. **Practice communicating** - blogging exercises your writing and communication skills so you’ll get better at those
4. **Enhance career opportunities** - maintaining a blog a is a great way to impress prospective employers by demonstrating expertise and passion
5. **Have fun tweaking** - I find it fun to maintain a blogging platform (tweaking this or that, moving to another platform, setting up tooling or scripts)
6. **Understand better** - you understand things better when you teach them to others through a blog
7. **Learn new things** - whether it is doing some digging to support part of a post, researching what others have posted on a subject, or asking others for help to prepare for a post, you learn new things along the way.
8. **Build community** - when people leave a comment or engage through another syndicated platform you can build community and make friends
9. **Own your content** - blogging, as opposed to posting content on other social sites, allows you to centralize and own your own content
10. **Learn from others** - soliciting feedback on a blog allows you to learn from others
Tips on improving teamwork
Tags: discuss, workplace
Published: 2018-01-21 04:05:59

---
title: Tips on improving teamwork
published: true
tags: discuss, workplace
---

Situation: Team lead graduated from the company and previous team practices, i.e. scrum and retrospectives, are also discontinued since no one stood up to the position. Now, team is less enthusiastic and juniors feel helpless at work. I figure this is the time to act but is clueless on what or how to.

###What practices can you advice to improve team work?

Revamp scrum and retrospectives? Truth is, I am not a fan of scrums since I am not good at interruptions. Gotta confess that one day, I proclaimed, "Let's not have scrum today" and so it was set on stone. I am thinking that maybe we are losing the true essence of these practices. Its not just a group of devs waiting in turn to say their tasks for the day, isn't it? Please enlighten us on these.

I'm also thinking of mentoring sessions, though I suck at that, but I strongly think it will help the team. Its a hurdle. So please can you also advice on mentoring, pair programming and such.


Leadership sure is hard.

Thanks in advance!
What Am I Doing Wrong?
Tags: beginners, discuss, career
Published: 2018-01-21 02:31:35

---
title: What Am I Doing Wrong?
published: true
description: 
tags: beginners, discuss, career
---

Hi, my name is Darrell Washington. I'm beginning to brand myself as Darrell "Inception Code" Washington. I think that's pretty cool besides that, I feel like I am in a rut. I fell in love with programming and the idea of solving problems behind a computer in the 10th grade. I then began mainly teach myself front-end web development. Along the way, I ran into a few mentors who broaden my perspective and helped polish my skills. 

I am 21 now and starting to search high and low for any Junior role. I have been through multiple interviews, opportunities, and company tours. I came across plenty of interns and Junior Devs, who was just starting out at their companies not even a year ago. I feel as if I have the same amount of beginner knowledge and skills but I can't land the job. 

I have a website, a pretty decent GitHub with over 15 repos I have a few clients under my belt as well. I've created a web app and a few other React Apps. I'm just wondering why am I not receiving callbacks, or unable to get through interviews. I am completely open to all suggestions, feedback, and criticism. I've noticed that sometimes I don't understand certain terminology and theoretical things involved with development. However, I believe my resume and personal experience showcases my practical knowledge, at least at a junior level. 

I feel like throwing in the towel sometimes. Especially when I hear stories about people switching professions and landing a job in three months. Also, stories about people teaching themselves how to code and 6 months later they land a job. Don't get me wrong that's great, inspirational and amazing to think about how an industry such as IT and tech has different ways of entry. 

What can I improve? Is it my social media presence? Not enough projects? Simply, not enough education? What could it be? Thanks in advance for the advice and support.
6th tip to understand legacy code
Tags: softwareengineering
Published: 2018-01-20 14:52:32

---
title: "6th tip to understand legacy code"
published: true
tags: software engineering
canonical_url: http://asawicki.info/news_1672_6th_tip_to_understand_legacy_code.html
---

I just watched a video published 2 days ago: **"5 Tips to Understand Legacy Code"** by Jonathan Boccara:

{% youtube xOsmO4Gnj6c %}

I like it a lot, yet I feel that something is missing here. The author gives 5 tips for how can you start figuring out a large codebase that is new to you.

1. "Find a stronghold" - a small portion of the code (even single line) that you understand perfectly and expand from there, look at the code around it.
2. "Analyze stacks" - put a breakpoint to capture a representative moment in the execution of the program (with someone's help) and look at call stack to understand layers of the code.
3. "Start from I/O" - analyze the code that processes data at the very beginning (input data, e.g. source file) or at the end (output data).
4. "Decoupling" - learn by trying to do some refactoring of the code, especially to decouple some of its parts.
5. "Padded-room" - find a code that doesn't depend on any other (has limited scope) and go from there.

These are all great advices. I agree with them. But computer programs have two aspects: dynamic (the way the code executes over time - algorithms, functions, control flow) and static (the way data are stored in memory - data structures). I have a feeling that these 5 points focus mostly on dynamic aspect, so as an advocate of "data-oriented design" I would add another point:

**6. "Core data structure":** Find structures, classes, variables, enums, and other definitions that describe the most important data that the program is operating on. For example, if it's a game engine, see how objects of a 3D scene are defined (some abstract base CGameObject class), how they can relate to each other (forming a tree structure or so-called scene graph), what properties do they have (name, ID, position, size, orientation, color), what kinds of them are available (mesh, camera, light). Or if that's a compiler, look for definition of Abstract Syntax Tree (AST) node and enum with list of all opcodes. Draw UML diagram that will show what data types are defined, what member variables do they contain and how do they relate to each other (inheritance, composition). After visualizing and understanding that, it will be much easier to analyze the dynamic aspect - code of algorithms that operate on this data. Together, they form the essence of the program. All the rest are just helpers.
Evening Rust: Episode 3: Clanking Onward
Tags: video, coding, rust, competition
Published: 2018-01-20 08:00:49

---
title: "Evening Rust: Episode 3: Clanking Onward"
published: true
description: Batman on Mars!?
tags: video, coding, rust, competition
cover_image: https://thepracticaldev.s3.amazonaws.com/i/0vmp0p58lwy5nqfwupxg.jpg
---

{% youtube uYr7-UC41KA %}

We send Batman off to rescue a bomb and defuse hostages, or something like that. Then we try our hand at a clash, which appears to be a code-golf challenge: finishing poorly (but later we come in third for a time based one). We tried the second version of the Mars lander, which seems exceedingly difficult for a "Medium" task. I attempt to solve it without the correct calculus, and do quite well, failing only the last one, which probably requires "correct" estimates not just continuous correction.

Subscribe to my [Twitch Channel](https://www.twitch.tv/mortoray) to watch live. Commentary appreciated.
When applying for a job, how would I make it clear that I can't do phone interviews due to speech problems?
Tags: discuss, career
Published: 2018-01-19 22:37:20

---
title: When applying for a job, how would I make it clear that I can't do phone interviews due to speech problems?
published: true
tags: discuss, career
---

I have a speech difficulty, it's not a problem face to face, but it's very difficult to be understood over the phone. 

Are there steps I can take to let employers know that speaking over the phone would be problematic **without letting them believe that I'm unable to communicate face to face**

And would this handicap be a deal breaker?

Thanks
Не пишите бесполезные unit-тесты
Tags: php, webdev, testing, mockery
Published: 2018-02-15 11:25:26

---
title: "Не пишите бесполезные unit-тесты"
published: true
tags:  php, webdev, testing, mockery
canonical_url: https://www.brandonsavage.net/dont-write-useless-unit-tests/
---

![PhpUnit](http://phpprofi.ru//resources/img/blogs/e9949af5-e0c8-4739-ad2b-955b6f1ef41e.jpeg)

На днях я наткнулся на следующий код в проекте:

```
class Users
{
    public function __construct(PDO $pdo)
    {
        $this->pdo = $pdo;
    }
 
    public function getAllUsers()
    {
        $stmt = $this->pdo->prepare('SELECT * FROM users');
        return $stmt->fetchAll();
    }
}
```

&nbsp;

И был вот такой тест для проверки этого кода:

```
class UserTest extends TestCase
{
    public function testGetAllUsers()
    {
        $pdo = m::mock(PDO::class);
        $stmt = m::mock(PDOStatement::class);
         
        $pdo->shouldReceive(‘prepare’)->andReturn($stmt);
        $pdoStmt->shouldReceive(‘fetchAll’)->andReturn($userArray);
 
        $users = new Users($pdo);
        $result = $users->getAllUsers();
         
        $this->assertEquals($userArray, $users);
    }
}
```

_Обратите внимание, что я опустил остальную часть класса User, а также массив пользователей, который возвращается в тесте._

Этот тест на самом деле даёт нам 100%-ое покрытие кода в&nbsp;методе `getAllUsers()`. Но, к сожалению, для любой практической цели, этот тест полностью бесполезен.

----
Читать далее: http://phpprofi.ru/blogs/post/94

----
En: https://www.brandonsavage.net/dont-write-useless-unit-tests/
How to prepare for a competitive programming contest
Tags: discuss, career, algorithms
Published: 2018-01-19 19:11:17

---
title: How to prepare for a competitive programming contest
published: true
description: Competitive programming preparation
tags: discuss, career, algorithms
---

### What is this about?

Tomorrow in the morning I'll have a regional programming contest, where I'm at my 4th participation. Overall, I got into the competitive programming area like 4 years ago and I think I learned some tricks that might help you with getting rid of panic and stress.

### What is a competitive programming contest?

You receive few algorithmic problems and you are required to solve them as efficient and optimized you can, considering the limit times and memory given to you.

Now, here comes the fun part:

#### 1. If it's a given theme, focus on it, but don't forget the others

If the contest is based on some "ideas" or only on some data structures or algorithms (for example, all of the problems are graph-related), try to focus on it but never, absolutely never, don't forget the other ones. You don't know when you have an opportunity to use something that you wouldn't expect to.

#### 2. Don't stress yourself

Even if it's a contest, it is not meant to make you stressed. Before, while it happens and even after it you have to be as chilled as you can, and try not to get make yourself some problems when they shouldn't be here.

#### 3. One day before, don't touch algorithms

Don't. Just don't. You will keep your eyes and mind focused more than ever on the things you do the day before, and it might screw you up. Do anything else, take a walk, read a book, just don't touch the algorithms or problems. Maybe for some of you, this might be helpful, but for the big majority, this ain't helping at all.

#### 4. Split the problem

A lot of competitive challenges, come with a very big description, that might get you scared. Get a pen and a paper, read a phrase and shortly remove the unnecessary words and try to translate them into a more "understandable" logic
For this, I recommend all the tutorials from [TopCoder](https://www.topcoder.com/community/data-science/data-science-tutorials/).

#### 5. Don't miss the fun

Even if it's a contest, it is a great opportunity to meet new people with same passions like you. Don't forget to talk, socialize and have fun (and yes, even problems are fun).


In the end, I can tell you this: stay focused but don't go obsessed with it. Take your time and even if you don't get it the first time, keep working and everything will come to the expected end. Until next time, good luck and happy coding!
How to see top posts in a category?
Published: 2018-01-19 19:08:37

---
title: How to see top posts in a category?
published: true
tags: 
---

![TopTen](https://thepracticaldev.s3.amazonaws.com/i/92o4nd14e1gwwhhyes6t.jpg)

I want to see the top post (measured by viewed and liked) of day, week, month & year in a specific category (e.g. Nodejs or Android). but I can't find any tool for that.

How can I do it in dev.to ?
Friday Blast #24
Tags: fridayblast, links, post
Published: 2019-01-20 15:22:28

---
title: Friday Blast #24
published: true
tags: friday_blast,links,post
canonical_url: https://horia141.com/friday-blast-24.html
series: "Friday Blast"
---

A video heavy link set today. Hope you enjoy.

[Advice for first time founders (2017)](https://blog.ycombinator.com/advice-for-first-time-founders/) - nuggets of wisdom from YC founders to first time founders. Hiring/firing and knowing the customer seem to be the most common things.

[How we made the microprocessor (2017)](https://www.nature.com/articles/s41928-017-0014-8) - a small bit of the history of the first microprocessor - not 8086, not 8008, but 4004.

[Efficient analytics with Redis bitmaps (2017) #talk](https://www.youtube.com/watch?v=a-BtWlU55kk&mkt_tok=eyJpIjoiTURrMk9UVmtZVGMzWWpBNSIsInQiOiJmWHdNN2c2WG5xc1ZcL3JGdjI3YzF5TFlEVm5jZ3ZnVVpXb2Y4RFo4bkVBSUZKQXp4Q2FlQlFTdDRvSmwyMGtnWWY3UDFYOEpkQW9CbWxxamYrWDBtUXhFZHdoc0RPUUdmdjNCKzhWUE1IZVpJcVJoNGRyeGREYTJNdm5EWjRPM1EifQ%3D%3D) - Another Redis based talk and an example of using Redis’ bitmaps for analytics. Bitmaps are a datatype, much like lists or sets, so working with them feels quite natural in Redis. The usage described here is quite similar to how some databases optimize analytics queries via fast bitmap operations.

[Transactions: myths, surprises and opportunities (2015) #talk](https://www.youtube.com/watch?v=5ZjhNTM8XU8) - basically covers ACID, Isolation Levels and serialization anomalies plus a bit of history about how they came about. Entertaining speaker and nice presentation of the concepts.

[Purely functional datastructures (2015) #talk](https://www.youtube.com/watch?v=KtltiBfvqCE) - a brief introduction to a very interesting topic - building data-structures without mutation & persistent datastructures. The speaker managed to cover stacks and queues. Not to dissapoint, the topics are quite hard. Even the simple queue ends up being quite complex when designed to be immutable/persistent _and_ performant.
Is it worth reading source code? 
Tags: discuss, javascript, react, node
Published: 2018-01-19 15:32:22

---
title: Is it worth reading source code? 
published: true
description: About reading source codes of libraries you use
tags: discuss, javascript, react, node
---


Hey! I was wondering about reading source codes of libraries that you may use on a daily-basis.

Like, if I decided to learn React and Redux, it's worth taking some time to go to the source codes and dig deep into how it works? Or it's not necessary and just using it a lot will make me understand enough about it? 

I don't have some clearly opinions about it and I never had really looked to a source code of something big. 

Sometimes maybe it's easier because in the React example, it's also written in JavaScript, but if I wanted to understand de Node.js core I would have to understand C++, and it would take more time.

What do you think?
Compilers 101 - Overview and Lexer
Tags: compiler, llvm
Published: 2018-01-19 15:20:50

---
title: Compilers 101 - Overview and Lexer
series: Compilers
published: true
description: Start learning the high-level concepts of how a compiler works.
tags: compiler, llvm
cover_image: https://thepracticaldev.s3.amazonaws.com/i/6qun34secqb1tsrp8yx7.png
---

These compiler posts will all be at a high-level and are based on the LLVM and Compiler session from the [Xojo Developer Conference 2016](http://www.xojo.com/xdc). None of these posts are going to teach you how to write a compiler. The goal of these posts is for you to have a basic understanding of the components of a compiler and how they all work together to create a native app.

# Compiler Components
A compiler is a complicated thing and consists of many components. In general the compiler is divided into two major parts: the front end and the back end. In turn, those two parts have their own components.

For the purposes of these posts, this is how we will be covering the components of the compiler:

## Front End
The front end is responsible for taking the source code and converting it to a format that the back end can then use to generate binary code that can run on the target CPU architecture. The front end has these components:

* Lexer
* Parser
* Semantic Analyzer
* IR (intermediate representation) Generator

## Back End
The back end takes the IR, optionally optimizes it and then generates a binary (machine code) file that can be run on the target CPU architecture. These are the components of the back end:

* Optimizer
* Code Generation
* Linker

Each of these steps processes things to get it a little further along for the next step to handle.

The linker is not technically part of the compiler but is often considered part of the compile process.

# Lexer
The lexer turns source code into a stream of tokens. This term is actually a shortened version of “lexical analysis”. A token is essentially a representation of each item in the code at a simple level.

By way of example, here is a line of source code that does a simple calculation:

    sum = 3.14 + 2 * 4

1. The first token it finds is “sum”
  * type: identifier
  * value: sum
  * start: 0
  * length: 3
2. Token: =
  * type: equals or assigns
  * value: n/a
  * start: 4
  * length: 1
3. Token: 3.14
  * type: double
  *  value: 3.14
  *  start: 6
  * length: 4
4. Token: +
  * type: plus
  * value: n/a
  * start: 11
  * length: 1
5. Token: 2
  * type: integer
  * value: 2
  * start: 15
  * length: 1
6. Token: *
  * type: multiply
  * value: n/a
  * start: 15
  * length: 1
7. Token: 4
  * type: integer
  * value: 4
  * start: 17
  * length: 1

As you can see, white space and comments are ignored. So after processing that single line of code there are 7 tokens that are handed off to the next part of the compiler, which is the Parser. The Parser is covered in the next post.

* [Compilers 102 - Parser](https://dev.to/lefebvre/compilers-102---parser-2gni)

**This post first appeared on the Xojo Blog as [Compilers 101 - Overview and Lexer](https://blog.xojo.com/2017/12/06/compilers-101-overview-and-lexer/).**
Help - Feedback required
Tags: devops, aws, help
Published: 2018-01-19 14:36:26

---
title: Help - Feedback required
published: true
description: We are going to launch our platform soon and need critical feedback from the community.
tags: #devops, #aws, #help 
---

Hi guys,

I have been working with my team for some time now and I manage the product and am looking for constructive feedback from the community.

All Aboard?

[TotalCloud - Cloud Infrastructure Monitoring & Management](https://totalcloud.io)

FYI- made on Unity3D.

Cost Analyzer
![Cost Analyzer](https://thepracticaldev.s3.amazonaws.com/i/gy9622h8gpmcn9wqhpp6.gif)

Dynamic Grouping
![Dynamic grouping](https://thepracticaldev.s3.amazonaws.com/i/tw2p1wvigyyttsmvfdy7.gif)

Topology View
![Topology view](https://thepracticaldev.s3.amazonaws.com/i/ppu9yk1yr5lmht7lfo43.gif)

Operations
![Operations](https://thepracticaldev.s3.amazonaws.com/i/6r7zv1w916r7raa9fogm.gif)

Future Roadmap: https://trello.com/b/MNqUzIJr/totalcloud-feedback-feature-request

Open to suggestions
Relancer une commande jusqu’à ce qu’elle réussisse
Tags: shell, bash, blog, french
Published: 2018-10-04 01:21:34

---
title: Relancer une commande jusqu’à ce qu’elle réussisse
published: true
tags:  shell, bash, blog, french
canonical_url: https://mayeu.me/blog/relancer-commande-jusqua-quelle-reussisse/
---

Régulièrement, je me retrouve à copier de gros fichiers via `rsync`, et étant donné que je suis souvent dans des endroits sans connexion Internet stable, je me retrouve à relancer `rsync` plusieurs fois jusqu’à la réussite de la commande.

Il est possible d’utiliser `while` pour ça, mais `while` continue de tourner tant que son test réussi, du coup il faut capturer le code de retour, tester la condition contraire, etc. Donc à moins de faire un petit script ça fait beaucoup à taper juste pour une commande _ad hoc_.

C’était sans compter sur l’existence de la commande `until`, qui vas continuer de relancer la commande tant qu’elle échoue.

Ça s’utilise de la manière suivante :

```
$ until <mettre la commande ici>; do echo "Retrying at `date -Iminutes`"; done
```

Donc avec `rsync` ça donne :

```
$ until rsync -aP src:/path/to/copy dest/; do echo "Retrying at `date -Iminutes`"; done
```

Et si vous êtes vraiment fainéant, vous pouvez toujours faire un alias (laissé en exercice pour le lecteur ;) ).

*Cet article a été initialement publié sur [mayeu.me](https://mayeu.me/blog/relancer-commande-jusqua-quelle-reussisse/).*