teleren/devto huggingface dataset:
Introduction to Functional Programming in Scala
Tags: beginners, programming, tutorial, scala
Published: 2024-01-21 00:34:29

## Introduction

Functional programming is a programming paradigm that focuses on the use of mathematical functions to solve problems. It is becoming increasingly popular due to its powerful capabilities and efficient approach to coding. One language that has gained recognition in the world of functional programming is Scala. Scala is a multi-paradigm language that supports both object-oriented and functional programming. In this article, we will delve deeper into the world of functional programming in Scala.

## Advantages

- **Efficient Data Handling**: One of the main advantages of functional programming in Scala is its ability to handle complex and large datasets efficiently. This is facilitated by the use of immutable data structures, which ensure that values, once assigned, cannot be changed.
- **Error Reduction**: Scala’s type system helps catch errors during compilation, significantly reducing runtime errors and making the code more reliable.

## Disadvantages

- **Learning Curve**: Developers coming from an object-oriented background may find it challenging to adapt to Scala's functional style of coding, contributing to a steep learning curve.
- **Complex Syntax**: Scala's syntax can be overwhelming for beginners, making it difficult for those new to the language.

## Features

- **Higher-Order Functions**: Scala allows functions to be passed as parameters, enabling developers to write more efficient and concise code.
- **Pattern Matching**: This feature enables developers to match complex data structures easily, simplifying data manipulation.
- **Lazy Evaluation**: Scala's support for lazy evaluation allows for more efficient resource use, speeding up the processing of large datasets.

## Conclusion

Functional programming in Scala presents numerous advantages, including efficient data processing and enhanced code reliability. However, the steep learning curve associated with Scala's syntax and functional programming concepts can be challenging. Nonetheless, Scala's rich features make it an exceptionally powerful language for functional programming. As the shift towards functional programming continues, mastering Scala will become increasingly beneficial for developers looking to create efficient and scalable applications.
JAVA- 2DArray List
Published: 2024-01-21 00:19:03

```
import java.util.ArrayList;

public class Main {
	
		public static void main(String[] args) {
		
		//2D ArrayList = a dynamic list of lists
		//You can change the size of these lists during runtime
		
		ArrayList<ArrayList<String>> groceryList = new ArrayList();
			
		ArrayList<String> bakeryList = new ArrayList();
		bakeryList.add("pasta");
		bakeryList.add("garlic bread");
		bakeryList.add("donuts");
		
		ArrayList<String> produceList = new ArrayList();
		produceList.add("tomatoes");
		produceList.add("Zucchini");
		produceList.add("pepper");
		
		ArrayList<String> drinksList = new ArrayList();
		drinksList.add("Soda");
		drinksList.add("Coffee");
		
		groceryList.add(bakeryList);
		groceryList.add(produceList);
		groceryList.add(drinksList);
		
		System.out.println(groceryList);
			
	}
			
}
```
Exploring Feature Stores: Personal Insights and Notes on Hopsworks
Tags: mlops, dataengineering
Published: 2024-01-21 00:15:47

Taking a slight detour from my ongoing [MLOps project](https://dev.to/dplata/mlops-project-setup-upload-data-to-hopsworks-feature-store-1727) to delve a bit deeper into [Hopsworks](https://www.hopsworks.ai).

These are my random notes in no particular order, since starting to work on the MLOps project:


![AI generated image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kply18avwoxcpwrjlath.png)

1. **The Purpose of Feature Stores**: At heart, feature stores are dedicated spaces for storing features essential for machine learning models. These features have already undergone the process of feature engineering.

2. **Exploring External Tables in Hopsworks**: Hopsworks offers support for external tables such as JDBC-enabled source, Snowflake, Data Lake, Redshift, BigQuery, S3, and others as feature groups. This is something I've yet to try, but I'm keen to explore. Their JDBC connector is not great yet.

3. **Feature Views**: Hopsworks 'Feature Views' are essentially a composite of features drawn from various feature groups. I haven't had the chance to use feature views yet.

4. **Easy Use with Python**: Hopsworks has user-friendly interfaces, especially Python.

5. **Feature Groups Versioning**: Hopsworks allows versioning of feature groups. This is an advantage over using just a simple SQL table. It works for having a history track of your features and allows better management and control over ML model's data.

Silverboy
Title: A Celebration of Innovation and Collaboration
Published: 2024-01-21 00:12:12

"TechHacks 4.0: Wrapping Up the Ultimate Tech Extravaganza!

Introduction: TechHacks 4.0, the much-anticipated technology hackathon, reached its grand finale with a spectacular closing ceremony. As teams from around the world showcased their ingenuity and collaboration, the event proved to be a melting pot of innovation, creativity, and skill.

Key Highlights:

Diverse Projects: The hackathon featured a diverse range of projects, spanning from cutting-edge software solutions to hardware innovations. Teams explored areas such as artificial intelligence, cybersecurity, sustainable technology, and more.

Industry-Leading Judges: Esteemed judges from various tech industries evaluated the projects, providing valuable insights and constructive feedback to the participants. Their expertise added a layer of professionalism to the hackathon.

Collaboration and Networking: Participants engaged in intense collaboration, fostering a sense of community and camaraderie. The event also facilitated networking opportunities, allowing participants to connect with like-minded individuals and potential future collaborators.

Closing Ceremony:

The closing ceremony was a momentous occasion, bringing together participants, judges, sponsors, and tech enthusiasts. The atmosphere was charged with excitement and anticipation as everyone awaited the announcement of winners.

Acknowledgment of Efforts: The organizers took a moment to express gratitude to all participants for their hard work, dedication, and innovative spirit throughout the event. They highlighted the importance of such collaborative efforts in pushing the boundaries of technology.

Winner Announcements: The much-awaited moment arrived as the winners were announced in different categories. The ceremony celebrated not only the top performers but also recognized notable achievements in various domains.

Guest Speakers: The closing ceremony featured inspiring talks from guest speakers who shared insights into the rapidly evolving tech landscape. Their words motivated participants to continue exploring new horizons and pushing the boundaries of what is possible.

Future Prospects: The organizers concluded the ceremony by discussing future prospects, including potential collaborations, upcoming events, and opportunities for further skill development.

Conclusion:

TechHacks 4.0 concluded on a high note, leaving participants with a sense of accomplishment and inspiration. The event showcased the power of technology to solve real-world problems and the importance of collaboration in driving innovation forward. As participants dispersed, they carried with them not just memories of a hackathon but a shared vision for a future shaped by technology and collaboration.
Navigating the Sponsorship Seas 🌊
Published: 2024-01-21 00:09:15

"TechHack Unveiled: Sponsors in the Spotlight"

Sponsors are the backbone of events like TechHack, providing the resources and support that ignite the creative flames among participants. But behind the scenes, the sponsorship landscape is ever-changing, demanding flexibility and resilience.

. Finding Harmony in Expectations 🤝

One challenge we grapple with is aligning sponsor expectations with the reality of TechHack. Despite careful planning, bridging the gap between sponsor goals and our event's vision requires effective communication and a deep understanding of both sides.

. Conquering Resource Constraints 💻

TechHack thrives on pushing technological boundaries, but resource constraints can be a hurdle. Sponsors play a vital role in providing tools and technologies, yet managing and optimizing these resources presents an ongoing challenge.

. The Dance of Sponsor Engagement 💃🕺

Sponsor engagement is a two-way street. While sponsors contribute significantly, maintaining their involvement throughout the event demands strategic planning and constant communication.

. Navigating the Winds of Change 🌬️

In the dynamic tech landscape, change is constant. Sudden shifts in industry trends or unforeseen challenges can impact sponsor dynamics. Adapting quickly to these changes is a skill we continually refine.

Turning Challenges into Opportunistic Adventures 🚀

Despite the challenges, each obstacle is an opportunity for growth. TechHack is more than an event; it's a dynamic ecosystem where sponsors and participants collaborate to overcome hurdles and achieve shared goals.

Strategies Crafting the Path to Success 🗺️

To address these challenges, we're implementing strategies that promote transparency, open communication, and mutual understanding. Our commitment to a symbiotic relationship with sponsors remains unwavering.

Eyes Fixed on the Innovation Horizon 👀

As we navigate sponsorship challenges at TechHack, our focus is on the horizon. Today's challenges build the foundation for a stronger TechHack tomorrow. Through collaboration, adaptability, and a shared passion for innovation, we're turning challenges into stepping stones toward a brighter future.

In the spirit of openness and continuous improvement, we invite our community to join us on this journey. Together, let's transform challenges into triumphs and pave the way for a TechHack that sparks innovation on an unparalleled scale. 🚀🌐
JAVA-ArrayList
Published: 2024-01-21 00:05:35

```
import java.util.ArrayList;

public class Main {
	
		public static void main(String[] args) {
		
		//ArrayList = a resizable array.
		//			Element can be added and removed after compilation phase
		//			store reference data types.
			
			ArrayList<String> food = new ArrayList<String>();
			
			food.add("pizza");
			food.add("hamburger");
			food.add("Noodles");
			
			food.set(0, "sushi");
			food.remove(2);
			//food.clear();
			
			for(int i=0; i<food.size(); i++) {
				System.out.println(food.get(i));
			}
			
			
	}
			
}
```
Caption This! 🤔💭
Published: 2024-01-21 00:00:00

---
published_at : 2024-01-21 00:00 +0000
---
Can you come up with the wittiest caption to explain what's happening here?

![A Renaissance painting of a woman looking distressed while pouring out a drink](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j3wcwlmax06izxdzoet8.jpg)

---

Follow the DEVteam for more online camaraderie!
{% embed [https://dev.to/devteam](https://dev.to/devteam) %}
What Defines Senior Developer Growth?
Tags: discuss
Published: 2024-01-21 00:00:00

---
published_at : 2024-01-21 00:00 +0000
---
Reflecting on your experience, how have senior developers evolved in behavior, particularly in listening, having an open mind, and valuing problem-solving over asserting personal ideas? Share examples that highlight this maturity.
Follow the DEVteam for more discussions and online camaraderie!
{% embed https://dev.to/devteam %}
Where is the value in your application?
Published: 2024-01-26 20:33:44

---
title: Where is the value in your application?
published: true
date: 2024-01-21 00:00:00 UTC
tags: 
canonical_url: https://www.oliverdavies.uk/archive/2024/01/21/where-is-the-value-in-your-application
---

Yesterday, I was in Birmingham for a hackathon event organised by the School of Code, who I've been a Bootcamp mentor for for the last few cohorts.

At the event, I was mentoring a team of three Bootcamp graduates to plan and build a Christmas-themed application.

We decided on a Christmas walking application where people can view upcoming walks, log in and book a place.

After designing some initial pages, such as the Home page with a login form, a registration form, a list of walks and a walk detail page, we started to code them.

Naturally, we started with the Home page, the login form and the login functionality.

But, is that the most valuable part of the application?

What differentiates it from other applications, such as the ones being built by other squads at the event?

In this case, it's the page showing the list of walks and, if you click one, the details about that walk.

The squad needed to give a presentation and demo of the application by the end of the day, so we needed to prioritise.

We refocused on the walk pages and built them before moving back to the other pages to complete the user journey so it could be shown.

Similarly, we didn't need a fully functional user login and registration system for the demo. We just needed to show the forms we'd built, demo the user journey and show how someone would find and register for an event.

When I'm building an application, I identify the most valuable part and focus on it rather than other unrelated functionality that could likely be done manually or another way until that functionality is available.

The beginning of the user journey isn't always the best first thing to start developing.

It was a great day, our squad won the prize for the event, and I look forward to attending more events and continuing to work with the School of Code.

 P.S. Need help or want another pair of eyes on your code? Book a [1-on-1 consulting call](https://www.oliverdavies.uk/call) or an [online pair programming session](https://www.oliverdavies.uk/pair) with a 100% money-back guarantee.
JAVA- Wrapper Classes
Published: 2024-01-20 23:56:26

```
	public class Main {
	
		public static void main(String[] args) {
		

		//wrapper class = provides a way to use primitive data types as reference data types
		//				  reference data types contain useful methods
		//				  can be used with collections (ex.ArrayList)
			
		//primitive		//Wrapper
		//
		//boolean		Boolean
		//char			Character
		//int			Integer
		//double		Double
			
		//autoboxing = the automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper classes.
		//unboxing = the reverse of autoboxing. Automatic conversion of wrapper class to primitive
			
		Boolean a = true;
		Character b = '@';
		Integer c = 123;
		Double d = 3.14;
		String e = "Bro";
		
		if (b=='@') {
			System.out.println("This is true");
		}
			
			
	}
			
}
```
JAVA-String Methods
Published: 2024-01-20 23:34:30

```
	public class Main {
	
		public static void main(String[] args) {
		

		//String  =  a reference data type that can store one or more characters
		//			reference data types have access to useful methods
			
		String name = "Bro";
		
		//boolean result = name.equalsIgnoreCase("Bro");
		//int result = name.length();
		//char result = name.charAt(0);
		//int result = name.indexOf("o");
		//boolean result = name.isEmpty();
		//String result = name.toUpperCase();
		//String result = name.toLpperCase();
		//String result = name.totrim();
		String result = name.replace('o','a');
		
		System.out.println(result);
			
			
	}
			
}
```
Do organizations need to adopt microservices?
Tags: microservices, cloudnative, kubernetes, devops
Published: 2024-01-20 23:28:45

Choosing whether or not to move to microservices depends on various factors, and there is no one-size-fits-all. If you decide not to move to microservices, you might continue with a monolithic architecture or another alternative. 
<br>
Here are some potential consequences of not adopting microservices
<br>
## 1. Monolithic Challenges
Staying with a monolithic architecture may lead to challenges in scalability, maintenance, and deployment. Monoliths can become complex and harder to manage as the application grows.
<br>
## 2. Limited Agility
Microservices are often associated with increased agility and faster development cycles. Not adopting microservices might limit your ability to respond quickly to changing business requirements.
<br>
## 3. Resource Efficiency
Microservices allow for independent scaling of components, which can lead to more efficient resource utilization. Without microservices, scaling might be more cumbersome, leading to potential resource inefficiencies.
<br>
## 4. Technology Lock-In
Adopting microservices can offer flexibility in terms of technology choices for different components. Staying with a monolithic architecture might result in technology lock-in, limiting your ability to adopt new tools and frameworks.
<br>
## 5. Team Autonomy
Microservices enable teams to work independently on specific services, promoting autonomy. Without microservices, teams might need to coordinate more closely, potentially slowing down development processes.
<br>
## 6. Fault Isolation
Microservices provide better fault isolation, meaning issues in one service don't necessarily affect others. In a monolithic architecture, a failure in one part can impact the entire application.
<br>
## 7. Scalability Challenges
Scaling a monolithic application can be challenging, especially if certain components require more resources than others. Microservices allow for more granular scalability.
<br>
## 8. Continuous Delivery
Microservices often facilitate continuous delivery practices, allowing for frequent and incremental updates. Without microservices, achieving a seamless continuous delivery pipeline may be more difficult.
<br>
Ultimately, the decision to move to microservices or stick with another architecture depends on your specific business needs, the nature of your application, and your development team's capabilities. It's important to carefully assess the trade-offs and make a decision that aligns with your organization's goals and priorities.
JAVA- 2D Array
Published: 2024-01-20 23:26:33

```
	public class Main {
	
		public static void main(String[] args) {
		

			//2D array = an array of arrays
			
			String[][] cars = {
						{"Camaro","Corvette","Silverado"},
						{"Mustang", "Ranger", "F-150"},
						{"Ferrari", "Lambo", "Tesla"}
						};
			
			for(int i=0; i<cars.length; i++) {
				System.out.println();
				for(int j=0; j<cars[i].length; j++) {
					System.out.println(cars[i][j]+" ");
				}
			}
			
			
			
	}
			
}
```
Node.js - What a mess...
Published: 2024-01-20 23:13:56

So I've been trying to fix my build server where I run an Angular build. For some reason it got broken and I had to revisit the installation of nvm, nodejs, ng. 

Curiously trying to install ng with 
`npm install -g @angular/cli`
resulted in a thousand of errors. 

For some unknown reason npm was trying to compile node-sass with g++! The root cause was g++ not found. Ok, I know how to install g++ on Linux. But the next attempt resulted in even more ridiculous errors: make failed because g++ failed to compile some c++ code. 

And all of this when just trying to install Angular.

At this point I realized that I probably was trying to install Angular the old way:
`npm install -g angular-cli`

And that it probably mattered.

So I tried the new way:
`npm install -g @angular/cli`
and it seemed to work.

But then and all the way along this painful process I received errors like:
File exists: /home/vitaly/.nvm/versions/node/v16.14.2/bin/ng
or
node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by node)

Finally I had to install a lower version of angular cli to make it work:
npm install -g @angular/cli@16.2.10

What a mess! I keep repeating this as I look at Node.js, npm and Angular compatibility and installation process. 

If you don't trust my opinion read through the answers of this question at Stackoverflow:
https://stackoverflow.com/questions/72921215/getting-glibc-2-28-not-found

This is woodoo. And it smells like enterprise, bureaucracy and a big piece of sh*t.
JAVA- Nested Loop
Published: 2024-01-20 23:10:33

```
import java.util.Scanner;
	public class Main {
	
		public static void main(String[] args) {
			
			//nested loops = a loop inside of a loop
			
			Scanner scanner = new Scanner(System.in);
			
			int rows;
			int columns;
			String symbol = "";
			
			System.out.println("Enter # of rows: ");
			rows = scanner.nextInt();
			System.out.println("Enter # of colums: ");
			columns = scanner.nextInt();
			System.out.println("Enter symbol to use");
			symbol = scanner.next();
			
			for(int i=1; i<=rows; i++) {
				System.out.println();
				for(int j=1; j<=columns; j++) {
					System.out.print(symbol);
				}
			}
			
			
			
	}
			
}
		
			
	
		
	

```
JAVA- For Loop
Published: 2024-01-20 23:00:15

```
	public class Main {
	
		public static void main(String[] args) {
			
		
			for(int i=0; i<=10; i++) {
				System.out.println(i);
			}
			
			System.out.println("Happy New Year!");
	}
			
}
		
			
	
		
	

```
JAVA- While Loop
Published: 2024-01-20 22:56:01

```
	import java.util.Scanner;
	public class Main {
	
		public static void main(String[] args) {
			
		//while loop = executes a block of code as long as a it's condition remains true
			
		Scanner scanner = new Scanner(System.in);
		String	name = "";
			
		while(name.isBlank()) {
			System.out.println("Enter your name: ");
			name = scanner.nextLine();
		}
		
		System.out.println("Hello "+name);
			
	}
			
}
```
JAVA-Logical Operators
Published: 2024-01-20 22:50:05

```
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		
		//logical operators = used to connect two or more expressions
		//					&& = (AND) both conditions must be true
		//					|| = (OR) either condition must be true
		//					!  = (NOT) reverses boolean value of a condition

		Scanner scanner = new Scanner(System.in);
		
		System.out.println("You are playing a game! press q or Q to quit");
		String response = scanner.next();
		
		if(!response.equals("q") && !response.equals("Q")) {
			System.out.println("You are still playing the game *pew pew*");
		}
		else {
			System.out.println("You quit the game");
		}
		
		}
		
	}
```
JAVA- IF Statement
Published: 2024-01-20 22:31:22

```
public class Main {

	public static void main(String[] args) {
		
		//if Statement = perform a block of code if it's condition evaluates to be true
		
		int age = 75;
		
		if(age==75) {
			System.out.println("ok Boomer!");
		}
		else if(age>=18) {
			System.out.println("You are an adult");
		}
		else if(age>=13) {
			System.out.println("You are a teenager!");
		}
		else {
			System.out.println("You are not an adult");
		}
		
	}
	
		
}
	


```
JAVA- Random Number
Published: 2024-01-20 22:21:11

```
import java.util.Random;
public class Main {

	public static void main(String[] args) {
		
		
		Random random = new Random();
		
		int x = random.nextInt(6)+1;
		double y = random.nextDouble();
		boolean z = random.nextBoolean();
		
		System.out.println(x);
		System.out.println(y);
		System.out.println(z);
	}
	
		
}
	


```
Feedback requested: Run your repos instantly
Tags: programming, ai, productivity
Published: 2024-01-20 22:15:17

When I step away from a repo for more than a week, it's a pain to get it running again because someone changed something. 

I have to dig around Slack, Notion, GDocs, etc and waste hours trying to get it running again. 

To solve this problem, I've been hacking on a tool that connects your Terminal to the tools where your dev team is posting updates. **When you run into an error when trying to run a repo, Navi's AI will automatically suggestion solutions based on your team's knowledge **

Would love to hear your feedback! 

https://www.getnavi.dev/


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