Skip to content

Commit

Permalink
Add picture story and assessment rule
Browse files Browse the repository at this point in the history
  • Loading branch information
heubeck committed Jul 17, 2023
1 parent 85635e9 commit 8f69d3a
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 48 deletions.
Binary file added .assets/10_git_push.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/1_generate_repo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/2_open_codespaces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/3_install_sdks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/4_ext_html_preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/5_ext_jbang.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/6_ext_kotlin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/7_ext_rockstar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/8_exec_jbang.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .assets/9_git_stage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 1 addition & 43 deletions 3_Java_Minimalist/Challenge.java
Original file line number Diff line number Diff line change
@@ -1,49 +1,7 @@
import java.util.Arrays;
import java.util.stream.Collectors;

public class Challenge {

// TODO: Make empty before publish
String weightedSort(String text) {
var cleanedText = text
.replaceAll("[-']", "")
.replaceAll("[.,!?]", " ");

var lines = cleanedText.split("\s+");
var result = Arrays.stream(lines)
.distinct()
.map(l -> new Weighted(l))
.sorted()
.map(Weighted::toString)
.peek(l -> System.out.println(" " + l + " \\"))
.collect(Collectors.joining(System.lineSeparator()));

return result;
}

record Weighted(String word) implements Comparable<Weighted> {
@Override
public int compareTo(Weighted o) {
var weightDelta = o.weight() - weight();
if (weightDelta != 0) {
return weightDelta;
}
var length = Integer.min(o.word().length(), word.length());
for (int i = 0; i < length; i++) {
var charDelta = o.word().charAt(i) - word.charAt(i);
if (charDelta != 0) {
return charDelta;
}
}
return 0;
}
private int weight() {
return word.chars().sum();
}
@Override
public String toString() {
return "%s|%s".formatted(word, weight());
}
return "";
}

}
4 changes: 2 additions & 2 deletions 6_CSS_Drawing/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

## Specification

This is about plagiarizing the MMS Tech logo by just using empty `div`s and CSS.
This is about plagiarizing the MMS Tech logo by just manipulating empty `div`s and CSS.

![](../.assets/MMST.png)

## Implementation

Therefore please solely write to the `<style` and `<div class="logo">` elements in the [challenge.html](challenge.html) file.

You're free to use any CSS magic, but the only permitted html element are `div` inside the `div.logo` container.
You're free to use any CSS magic (apart from including, pixel mapping or vectorizing the original image of course), but the only permitted html element are `div`s inside the `div.logo` container.

## Scoring

Expand Down
2 changes: 1 addition & 1 deletion 6_CSS_Drawing/challenge.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<title>#6 CSS Exploitation</title>
<title>#6 CSS Drawing</title>
<style>
/* here's your sketch pad, let's call it: picture as code */

Expand Down
39 changes: 37 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,45 @@

πŸ‘‰ Copy [this template](https://github.com/heubeck/techsummit23-codingchallenges/generate) as (public) repository to your own GitHub profile<br/>
πŸ‘‰ Solve as many challenges as you like, following their respective guide<br/>
πŸ‘‰ Don't forget to commit and push your solution<br/>
πŸ‘‰ Use _GitHub Codespaces_ to create, commit and push your solution<br/>
πŸ‘‰ Submit your participation using **[this form](https://forms.office.com/e/0CenbaEQcp)**<br/>

#
# Picture-Story Guide

![](.assets/1_generate_repo.png)

![](.assets/2_open_codespaces.png)

`sdk install java 20-tem; sdk install jbang`
![](.assets/3_install_sdks.png)

![](.assets/7_ext_rockstar.png)

![](.assets/5_ext_jbang.png)

![](.assets/6_ext_kotlin.png)

![](..assets/8_exec_jbang.png)

![](.assets/4_ext_html_preview.png)

![](.assets/9_git_stage.png)

![](.assets/10_git_push.png)

# Solution assessment

Each single coding challenge is rated as follows:

* 10 Points to the best solution
* 7 Points to the second best solution
* 5 Points to the third best solution
* 2 Points to every correct solution
* 1 Point for every reasonable try

**The sum of all challenges makes up the overall score for a participant.**

# Let's Go

## [#1 Rockstar Anagram](1_Rockstar_Anagram/)

Expand Down

0 comments on commit 8f69d3a

Please sign in to comment.