Bitlocker
Mitigating unauthorized data access on lost or stolen computers.
Have you ever had a manager or department head who is a micromanager?
In the context of IT this often means being asked to provide documention accounting for how you spend your time.
I mean as a Sysadmin there is a fair amount of babysitting that goes on.
To name a few:
But what about the things that do require manual attention?
While the lists are not exhaustive you get the general idea.
There is also a small dichotomy worth mentioning(that a micro manager wouldn’t consider), it goes like this:
System running smooth => babysitting, system not running smooth => everyone not in IT dept is furious… at the IT dept.
So anyway back to micro management. How do you account for all this and satisfy your superiors, who think your job is chilling all day surfing the net or writing blog posts, while making this as low effort for yourself as possible? May I introduce the coin changing problem more generally known as the subset sum. Now we aren’t going to get into dynamic programming or any other algorithmic jazz. My main goal with this post is to point out applications of common algorithms you come across in CS that have practical applications, in this case dealing with management.
import random
import openpyxl
import os
from datetime import date
#############################################
# VARIABLES #
#############################################
hour_combinations = []
task_categories = [
'task category 1: description',
'task category 2: description',
'task category 3: description',
'task category N: description',
'project 1',
'project 2',
'project 3',
'project N'
]
workbook_save_location="C:\\Users\\adegraca\\Desktop\\crappycrap.xlsx"
worksheet_headers = ["category", "location", "hours"]
locations=["remote", "corporate", "field office", "blah blah blah"]
worksheet_data = []
#############################################
# FUNCTIONS #
#############################################
'''
Generates a list numbers between start and stop in step increments.
For this I usually put the longest time a task has taken me
and the smallest as start and stop respectively.
'''
def get_task_increments(start,stop,step=0.25):
numbers = []
while start <= stop:
numbers.append(start)
start += step
return numbers
'''
Algorithmic analysis coming in clutch.
Using the list generated in the function above,
We will generate a list of all possible combinations of task time increments
you can have in an 8 hour work day.
'''
def subset_sum(numbers, target, output, partial=[], debug='false'):
s = sum(partial)
# check if the partial sum is equals to target
if s == target:
if debug == 'true':
print ("sum(%s)=%s" % (partial, target))
output.append(partial)
if s >= target:
return # if we reach the number why bother to continue
for i in range(len(numbers)):
n = numbers[i]
remaining = numbers[i+1:]
subset_sum(remaining, target, output, partial + [n])
def createWorkSheetData():
todays_task_hours = random.choice(hour_combinations)
todays_task_categories = []
todays_task_locations = []
for i in range(0, len(todays_task_hours)):
todays_task_categories.append(random.choice(task_categories))
todays_task_locations.append(random.choice(locations))
return todays_task_categories, todays_task_locations, todays_task_hours
def createWorkdayLog(workbook_path):
wb = NULL
if os.path.exists(workbook_path):
wb = openpyxl.load_workbook(workbook_path)
else:
wb = openpyxl.Workbook()
# insert newest sheet in front
sheetname = date.today().strftime("%B %d, %Y")
ws = wb.create_sheet(sheetname,0)
wb.active = ws
wb.active.append(worksheet_headers)
data = createWorkSheetData()
for i in range(0, len(data[0])):
print(data[0][i], data[1][i], data[2][i])
row = [data[0][i], data[1][i], data[2][i]]
wb.active.append(row)
wb.save(workbook_path)
#############################################
# MAIN #
#############################################
#print(get_task_increments(0.25,3.0,0.25))
subset_sum(get_task_increments(0.25,3.0,0.25), 8.5, hour_combinations)
createWorkdayLog(workbook_save_location)
#print(hr_combinations)
If you’re not savy at reading code:
The last step is to schedule this script to run as a task. For example I have this run M-F at 8:30 am on my work desktop.
If you wanted to be a golden boy (or girl!) you could even email your supervisor your work.
At my job for instance:
( ͠≖ ͜ʖ͠≖)
We do not win by argueing or complaining.
We win by being smarter.
Now your PM/exec/whatever superior can have metrics they need to justify their teams productivity (and cost) and with your new found free time (I mean after all it takes alot of dilligent work to create an accurate representation of your time) you can look for another job or pursue a certification or write blog pots.