BCS foundation level test: DONE!
Changed the way I test, I need to get a better balance as it seems geared towards lots of documentation to the extent that I spend a lot of time documenting what I am doing rather than actually doing it. There has been the benefit that less is getting missed and managers can decide on risk relative to test cases run. A big benefit has been the confidence to say no and be able to back it up.
ITIL foundation: DONE!
Again a lot of documentation and process, a good trainer from Quanta. It was good as he was willing to engage and discuss that ITIL does not really deal with modern ways of doing project work (agile). From my point of view it is a way for the IT department to have the confidence to talk about business demands and maintaining a good relationship. It was an eye opener in what managers have to deal with in terms of scope creep.
BONUS, work paid for it all.
Getting back to programming now the above are out the way, started on the Java OCA 8, forgotten how much I enjoyed programming, big highs when it works, lows when it doesn't and a good challenge in between. So the habit I need to build is program everyday and build things, I want to mix in code challenges as a way of testing myself and doing something different.
And here is one I made earlier, I wanted an easy to paste example, it should have been a proper class.
package com.company;
import java.io.*;
import java.util.HashSet;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Main {
private static HashSet<String> words = new HashSet<>();
public static void main(String[] args) {
//read file into a set
FileReader fileReader;
BufferedReader bufferedReader;
try {
fileReader = new FileReader("C:\\enable1.txt");
bufferedReader = new BufferedReader(fileReader);
String currentWord = "";
while ((currentWord = bufferedReader.readLine()) != null) {
words.add(currentWord);
}
bufferedReader.close();
} catch (FileNotFoundException ex) {
System.out.println("File not found bro!");
ex.printStackTrace();
} catch (IOException ex) {
System.out.println("HDD broke bro!");
ex.printStackTrace();
}
// int how many lines to read
System.out.print("Lines to read: ");
Scanner scanner = new Scanner(System.in);
int linesToRead = scanner.nextInt();
// amount of lines specified above with string of what keys can be entered
String[] inputWords = new String[linesToRead];
for (int i = 0; i < linesToRead; i++) {
inputWords[i] = scanner.next();
}
System.out.println();
//output each user input line = longestWordFound
for (String word : inputWords) {
System.out.println(word + " = " + longestWordFromChars(word) );
}
}
// find the longest word that can be found using those keys
private static String longestWordFromChars(String chars) {
Pattern regex = Pattern.compile("\\b[" + chars + "]+\\b");
Matcher regexMatcher;
String longestWord = "";
for (String word : words) {
regexMatcher = regex.matcher(word);
if(regexMatcher.find()) {
if(word.length() > longestWord.length()) {
longestWord = word;
}
}
}
return longestWord;
}
}