teleren/devto huggingface dataset:
Building a Simple Weather App with HTML, CSS, JavaScript & OpenWeather Api
Tags: weatherapp, javascript, api, css
Published: 2024-02-07 17:34:33

In today's digital age, accessing real-time weather information has become incredibly convenient. From planning outdoor activities to deciding what to wear, having up-to-date weather data at our fingertips can make our lives easier. In this blog post, we'll walk through the process of building a simple weather app using HTML, CSS, and JavaScript. With just a few lines of code, you'll be able to create a sleek and functional web app that provides current weather conditions for any location worldwide.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ndb6gpxvvfgoyjx0npnf.png)

Getting Started:
To begin, let's set up our project structure. We'll need three files: `index.html`, `style.css`, and `script.js`. You can find the complete code for this project on my GitHub repository [here](https://github.com/pixelgig/Weather-App). Feel free to clone or download the repository to follow along.

HTML Structure:
Our HTML file (`index.html`) will contain the basic structure of our web app. We'll include input fields for users to enter their location and a button to fetch the weather data. Additionally, we'll have a section to display the weather information retrieved from the API.

{% codepen https://codepen.io/pixelgig/pen/XWGBywO %}
Conclusion:
And there you have it! With just a few lines of code, we've created a simple weather app that allows users to retrieve current weather information for any location. By leveraging the power of **HTML**, **CSS**, and **JavaScript**, we've built a functional web application that demonstrates the versatility and accessibility of web development technologies. Feel free to explore further enhancements, such as adding additional weather data or improving the user interface. Happy coding!

Feedback:
We value your feedback! If you have any suggestions, comments, or encountered any issues while using our weather app, please feel free to share them with us. Your feedback helps us improve the app and provide a better experience for all users.

You can leave your feedback by visiting the GitHub repository for the weather app at the following URL: [Weather App](https://pixelgig.github.io/Weather-App/). Simply navigate to the "Issues" tab and create a new issue with your feedback. Alternatively, you can also reach out to us directly via email or social media.

Thank you for taking the time to try out our weather app, and we appreciate your valuable feedback!

[Weather App GitHub Repository](https://github.com/pixelgig/Weather-App)
The S of SOLID in my view.
Tags: beginners, programming, webdev
Published: 2024-02-07 17:26:03

Hi, This is my first article on this site. This is my first article at all. So, in this series of articles, I want to review SOLID with Typescript. To start this series, of course, I want to talk about the S of SOLID (Single responsible principle). Uncle Bob says in the book Clean Architecture, 2019: "A module should be responsible to one, and only one, actor." This is because the name of the principle causes a lot of mistakes for programmers; they think something like that: "A class should do one thing."

But I think in this case, the correct answer is something like that: A class should only do one thing related to the actor or change only when this actor requests a change. The actor is related to users or stakeholders, and that's the point: a software or class only needs to change when these actors request a change.

So, here we can see several problems that we can solve by using that principle, like:
- Lack of cohesion.
- High coupling.
- Testing is hard.
- Reusing of code is too hard.

Let's go to examples.

Imagine a class that emits reports.
```typescript
class ReportService { 
  constructor(private apiEndpoint: string) {}
  public getReport(): any { 
    const salesReport = this.apiRequest('/sales'); 
    const sellersReport = this.apiRequest('/sellers'); 
    const billingsReport = this.apiRequest('/billings'); 
    return {
      salesReport, 
      sellersReport, 
      billingsReport,
    };
  }
  private apiRequest(endpoint: string): any {
    // Request 
  }
}
```
In this case, the class emits three reports: Sales, Sellers and billings. In this class, we have a method to request a report from the API and one method to export the report requested.Take a look; we have three actors here: The financial sector, the people sector, and a sector of sales. Imagine if one of these actors requests a change; all the classes need to change at the same time. And this causes a lot of work.

Take note: To solve this problem, we need to split responsibility. Making three classes, one for each actor.

Examples:
```typescript
class salesReportService{ 
  constructor(private apiEndpoint: string) {}
  public getReport(): any { 
    return this.apiRequest('/sales'); 
  }
  private apiRequest(endpoint: string): any {
    // Request 
  }

}
```

```typescript
class sellersReportService{ 
  constructor(private apiEndpoint: string) {}
  public getReport(): any {
    return this.apiRequest('/sellers'); 
  }
  private apiRequest(endpoint: string): any {
    // Request 
  }

}
```

```typescript
class billingsReportService{ 
  constructor(private apiEndpoint: string) {}
  public getReport(): any {
    return this.apiRequest('/billings'); 
  }
  private apiRequest(endpoint: string): any {
    // Request 
  }

}
```

Well. I think that's it. Sorry for any error, and feel free to correct me any time.
Firebase hosting does not support custom cookies
Published: 2024-02-07 17:21:10

Firebase hosting is useful now just for simple websites but it is also possible and sometimes cheaper to use as frontend for Google Cloud Run. It is a very common usage pattern to simply map your [firebase domain name](https://www.frontendeng.dev/blog/36-firebase-cookies-sessions) to a another service running on Google cloud.

Firebase has not documented this but firebase will strip all cookies from the incoming request except on. "__session" cookie. This means if your backend is say Spring Boot which uses SESSION cookie by default or PHP or something else, you will not be able to maintain sessions when using firebase hosting.

The quick workaround for this is to either not use Firebase if you care about this a lot OR modify your service to only use __session cookie.

https://www.frontendeng.dev/blog/36-firebase-cookies-sessions
Guts: Small lightweight code control system.
Tags: c, opensource, programming, computerscience
Published: 2024-02-07 17:19:32

# Guts

Introducing Guts, a simple tool to manage and create code repositories. This is essentially a smaller version of git I'm currently programming for my Cyber Security class at the school I attend.

Guts is written in C, with some extra bash scripts included to help with installation and updating. 

You can find the code for guts [here](https://github.com/colack/guts].

## Features

Guts is split into 3 main programs. 
1. Guts Offline - Run guts as a standalone application.
2. Guts Server - Run a guts server, and allow users to connect to your computer and upload / manage code.
3. Guts Client - Connect to a guts server and check on code, update code, etc.

Guts comes with commands and features to help manage your code.

# Notes

I will be posting more about guts the further I develop it. It would also be awesome if you contributed. 

Thanks,
- Jack
Tic-Tac-Toe in Python
Tags: python, programming, tutorial, coding
Published: 2024-02-07 16:42:17

The following program is one of the many portfolio projects on Codecademy.com's Computer Science Career Path. The project consists of a game of Tic-Tac-Toe written in the Python programming.

The code is setup where it creates the game board first and lets the player choose between 'X' and 'O' as the letter they wish to use. The code then randomly selects whether the player or the AI makes the first move of the game. The board is set up in a 3x3 grid where the player can choose where to place their letter by choosing 1-9, the numbers representing a different space on the board from left to right. As the game progresses they AI will check to see if it can win the game in the next move or block the player from winning the game in their next move. 

This game is meant to be a simple tutorial for people to get familiar with Python and various data structures.

GitHub Link: https://github.com/MasterofGames77/Portfolio-Project1
Wednesday Links - Edition 2024-02-07
Tags: java, jvm, kotlin, performance
Published: 2024-02-07 11:44:19

JDK 22 G1/Parallel/Serial GC changes (7 min)🗑️
https://tschatzl.github.io/2024/02/06/jdk22-g1-parallel-gc-changes.html

1BRC—The Results Are In! (7 min)🏅
https://www.morling.dev/blog/1brc-results-are-in/

Sorting Text in Java, How Complicated Can It Be? (5 min)🔤
https://foojay.io/today/sorting-text-in-java-how-complicated-can-it-be/

Threads, ThreadPools and Executors - Multi Thread Processing In Java (18 min)🧵
https://softwaremill.com/threadpools-executors-and-java/

Type Classes in Kotlin: A Practical Guide (15 min)🥒
https://blog.rockthejvm.com/kotlin-type-classes/

Micro-optimizations in Kotlin — 3 (4 min)🐜
https://www.romainguy.dev/posts/2024/micro-optimizations-in-kotlin-3/

Speeding up isBlank() in Kotlin (5 min)🚄
https://www.romainguy.dev/posts/2024/speeding-up-isblank/

Timing API: Mastering Time with Kotlin (12 min)⏱️
https://josiassena.com/mastering-time-with-kotlin-inside-the-new-timing-api/

Achieving High Throughput Without Sacrificing Latency (7 min)🏃
https://foojay.io/today/achieving-high-throughput-without-sacrificing-latency/

You Might Be Better Off Without Pull Requests (22 min)🍽️
https://hamvocke.com/blog/better-off-without-pull-requests/

Reading QR codes without a computer! (5 min)🔎
https://qr.blinry.org/
Domain Digger: Full open-source toolkit for next-level domain analysis
Tags: showdev, nextjs, cloud
Published: 2024-02-07 16:24:00

**[Try it out 🚀](https://digger.tools?ref=dev)**

[Source code on GitHub](https://github.com/wotschofsky/domain-digger)

I started this project out of frustration with similar existing tools. I would find myself switching between multiple different tools and copy-pasting a lot of data around. With Domain Digger I made it my goal, to incorporate all relevant tools into one and present them in one cohesive package.


**Here are the most notable features:**

- **🌍 Comprehensive DNS Lookup:** Access detailed DNS information.
- **📍 IP Details & Geolocation:** Get precise IP information including location data.
- **💡 Smart Suggestions:** Intelligent recommendations for efficient searches.
- **🔗 Global DNS Lookup:** Perform DNS lookups across different global servers.
- **🔄 Multiple DNS Resolvers:** Utilize various DNS resolvers for diverse insights.
- **🗺️ DNS Map Visualization:** Visual representation of DNS data.
- **🔍 Full & Quick WHOIS Lookup:** Rapid and detailed WHOIS data retrieval.
- **📜 Certificate History:** Track SSL/TLS certificate changes over time.
- **🔖 Quick-access Bookmarklet:** Bookmark for fast access.
- **🌓 Light and Dark Mode:** Choose your preferred theme for comfortable use.

Very curious to hear your feedback! Is there something you'd like to see added?

|                                      |                                 |
| :----------------------------------: | :-----------------------------: |
|              DNS Lookup              |             DNS Map             |
| ![DNS Records](https://github.com/wotschofsky/domain-digger/raw/main/docs/dns-records.png) |  ![DNS Map](https://github.com/wotschofsky/domain-digger/raw/main/docs/dns-map.png)   |
|              IP Details              |          WHOIS Lookup           |
|  ![IP Details](https://github.com/wotschofsky/domain-digger/raw/main/docs/ip-details.png)  | ![WHOIS Lookup](https://github.com/wotschofsky/domain-digger/raw/main/docs/whois.png) |
Key Considerations for Planning a Successful Design Process Automation Strategy
Tags: kbesolutions, cadcustomization, designprocessautomation
Published: 2024-02-07 16:14:34

Advanced computers and improved software have computerized and transformed design processes. This shift towards design automation, driven by sophisticated software tools and seamless data integration, has significantly improved the speed and accuracy of design processes. 

As industries increasingly adopt automated design approaches, it’s crucial to navigate this balance thoughtfully. Developing an effective design process automation strategy requires a deep understanding of the benefits and challenges brought by automation and empowering designers while using this technology. 


With this in mind, we can consider the benefits of using CAD in the field of design process and automation. Computer-aided design (CAD) is a pivotal process automation tool that can help seamlessly automate tasks, generate precise models, and streamline workflows for engineers and designers. 

Integrating CAD ensures an effective strategy for process automation, delivering efficient, consistent designs at a faster pace without sacrificing quality or innovation. Let’s see how!

Role of CAD in Design Process Automation Strategy
Integrating computers in construction design, especially through mathematical modeling and CAD, offers an excellent opportunity to streamline and enhance design processes. Advanced software has evolved significantly, and with substantial engineering knowledge, it has paved the way for more efficient and precise design creation. 


In particular, CAD systems for design process automation enable quick and accurate modeling, aiding designers in visualizing and refining concepts swiftly. This technological advancement empowers designers to make extensive use of sophisticated tools like robotic process automation software without in-depth training knowledge of intricate engineering calculations. CAD is pivotal in building an effective design process automation strategy that promises increased productivity and innovation. Read more about **[Key Considerations for Planning a Successful Design Process Automation Strategy](https://cadvisionengineers.com/effective-design-process-automation-strategy/)**
Could we stop prefixing booleans with the verb ?
Tags: development, cleancoding
Published: 2024-02-07 16:13:28

A widespread convention when it comes to Boolean variables naming is to prefix them with a verb. Sometimes the explanation given for this practice is that it helps reading code, other times that this way we directly can spot that this is indeed a boolean. I would like to discuss those two assumptions.

## It helps reading code

Maybe this is just me but I like when code reads like instructions. I agree that it can't always be the case but I feel I should strive for it whenever I can. Keeping that in mind we can look at this complex piece of code:

```javascript
  if isUserLoggedIn {

  }
```
Here we use the conventional prefixing, and the voice in my head reads: "If is user logged in...".

Now, if we consider this piece of code without prefixing I read "If user is logged in...":

```javascript
  if userIsLoggedIn {

  }
```

See, nothing spectacular, this won't change your life but still I feel like the second version is much more flowing than the first one, while prefixing "hurts" the readability. Please do note that we keep the `is` or `has` verbs, but at their natural placement, not as prefix.

## It helps spotting that it is a Boolean

Let me be honest: this is totally true. Whenever I encounter a variable prefixed with this `is` or `has`, I definitely know that this is a Boolean.

What I would like to challenge here, is the **need** behind this, the use case. Do I really need to know that this is a boolean at this specific point in time. This might be terribly personal, but I distinguish at least two ways of reading code. The first one, which refers to the previous part of this short post, when I want to understand the flow of the code, and the second one, when I'm diving into the code to edit it or spot an bug.

When I'm reading the code in a "I want to understand the flow" way, I don't really need to know that this is a boolean, I need a well named variable that helps me read what is happening, the fact that this is a boolean is a mere implementation detail that I don't need to know about. Moreover, I feel that reading `userIsLoggedIn` leave very few room to interpret it as something else than a boolean. On the contrary, if I'm diving into the code to edit it or spot a bug, in this case, yes, I need to know. But, if I'm in this mindset, I'm much more into "details mode" and I will definitely check the type of my variable which will be declared in there and this will be the only source of truth for me, not the fact that it starts with `is` or `has`.

## Conclusion

I guess that all this gibberish is about is that I try to prioritize readability when it comes to writing code, and I feel like this convention can hurt it. Now, if you are in a team where prefixing is a widespread convention, please do follow this rule or challenge it with the team but don't go rogue; being a team player is the one of the most important thing.
RECOVER YOUR SCAMMED BITCOIN WITH ULTIMATE SPACE SPY RECOVERY.
Published: 2024-02-07 16:11:26

At last, a reliable and effective service I can rely on! I can only imagine how many people are struggling with crypto-related issues and are likely also unsure of their ability to find practical solutions. This is where Space Spy Recovery rightfully enters the picture as the best provider of the service, and their ability to help recover 550,000 EUROS that I lost due to online cryptocurrency theft clearly confirms their claim! Space Spy Recovery came to my rescue! Get in touch for free:
 Email: soacespy@hackermail.com 
WhatsApp: +1 (458) 313 9075
Telegram: @spacespy65
How to make money online.
Tags: beginners
Published: 2024-02-07 15:44:16

[[](url)There are various ways to make money online, and the best approach often depends on your skills, interests, and resources. Here are some common methods:[](https://www.profitablegatecpm.com/xey9sndsu?key=17edbd1d9b260efa0fadf2c6d70d4991)

1. **Freelancing:**
   - Platforms like Upwork, Freelancer, and Fiverr connect freelancers with clients looking for services such as writing, graphic design, programming, and more.

2. **Online Surveys and Reviews:**
   - Participate in paid surveys or write product reviews on websites like Swagbucks, Survey Junkie, or Amazon's Mechanical Turk.

3. **Sell Products or Services:**
   - Start an online store on platforms like Etsy, eBay, or Amazon to sell handmade crafts, vintage items, or new products.
   - Offer your skills or services on websites like Etsy or Skillshare.

4. **Affiliate Marketing:**
   - Promote products and earn a commission for every sale made through your unique affiliate link. You can sign up for affiliate programs on websites like Amazon Associates, ShareASale, or ClickBank.

5. **Online Courses and Ebooks:**
   - Create and sell online courses or ebooks on platforms like Udemy, Teachable, or Amazon Kindle Direct Publishing.

6. **Stock Photography:**
   - If you're good at photography, sell your images to stock photo websites like Shutterstock, Adobe Stock, or iStock.

7. **YouTube Channel:**
   - Create and monetize a YouTube channel by producing content on topics you're passionate about. You can earn money through ad revenue, sponsorships, and merchandise sales.

8. **Blogging:**
   - Start a blog and monetize it through advertising, sponsored content, affiliate marketing, or selling products.

9. **Virtual Assistance:**
   - Offer virtual assistance services to businesses or entrepreneurs who need help with tasks like email management, social media, or customer support.

10. **Remote Work Opportunities:**
    - Explore remote job opportunities on websites like Remote OK, We Work Remotely, or LinkedIn.

11. **Stock Trading or Cryptocurrency:**
    - Invest in stocks or cryptocurrencies, but be aware that this involves risks and requires a good understanding of the market.

12. **Online Tutoring:**
    - Offer your expertise in a particular subject and provide tutoring services through platforms like Chegg Tutors, Tutor.com, or VIPKid.

Always be cautious of scams and ensure that any online opportunity you pursue is legitimate. Additionally, success often requires time, effort, and dedication, so be prepared to invest in your chosen method.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/upnz96enumrqmfx3iwae.jpg)
GitHub patch release previous version
Tags: github, git
Published: 2024-02-02 23:24:40

---
title: GitHub patch release previous version
published: true
date: 2024-02-07 15:37:00 UTC
tags: Github, git
canonical_url: https://dcblog.dev/github-patch-release-previous-version
---

On Github you way from time to time need to patch release the previous version of a published release.

This took me longer than I care to admit to understand the steps involved. Hence I'm documenting them in this post.

**Step 1: Check out the branch corresponding to the previous version of your code.**

`git checkout 7.3.0`

**Step 2: Fix the bug in the code.**

Let's say it's a breaking change that's been fixed in the code.

**Step 3: Commit the changes with a version number that indicates the patch release.**

Commit the fix

`git commit -m "Fix bug in 7.3.0"`

Next, create a new tag

`git tag 7.4.0`

**Step 4: Push the changes to the remote repository.**

`git push origin 7.4.0`

**Step 5: Create a new release for the patch version on GitHub.**

Navigate to the main page of the repository on GitHub.com, click on the Releases tab, and then click on the "Draft a new release" button.

**Step 6: Fill in the details for the release in the form, select the tag created from Step 3, and fill in the release notes.**

Once you have filled in the details, click on the "Publish release" button to publish the release.