1
00:00:00,960 --> 00:00:07,200
And here we are with a brand new section and as you may have realized this is one of those hands on

2
00:00:07,260 --> 00:00:15,270
sections as you're going to build yet another real world program and I use this particular program every

3
00:00:15,270 --> 00:00:22,470
single day for my personal use and I wouldn't go as far as to say this has changed my life but I can

4
00:00:22,470 --> 00:00:27,940
certainly say that this program has multiplied my work productivity.

5
00:00:28,350 --> 00:00:30,080
There's no magic there.

6
00:00:30,110 --> 00:00:37,350
It's a simple python program yet tricky that runs on the background and all it does is it doesn't

7
00:00:37,350 --> 00:00:45,570
let you browse certain distracting websites such as Facebook or your e-mail account during your working hours.

8
00:00:45,610 --> 00:00:46,110

9
00:00:46,170 --> 00:00:51,620
The program is tested to work on Windows, Mac and Linux.

10
00:00:51,630 --> 00:00:58,470
The idea is that once you build this program you pass to the program website links that you think

11
00:00:58,470 --> 00:00:59,760
are distracting.

12
00:01:00,000 --> 00:01:07,380
So you pass links as strings and the time that you are working on your computer and the program will

13
00:01:07,380 --> 00:01:11,330
block these websites during these working hours.

14
00:01:11,450 --> 00:01:19,350
And in that way you not only are much more productive but this also reduces stress as distraction is also known

15
00:01:19,350 --> 00:01:26,630
to cause stress. If you don't have anny problem with the distractions like I do you probably won't need

16
00:01:26,640 --> 00:01:28,120
this program.

17
00:01:28,160 --> 00:01:32,190
So I don't want to go further with the usability aspect.

18
00:01:32,640 --> 00:01:37,740
So usability is one of the benefits that you'll get from this program.

19
00:01:37,740 --> 00:01:44,550
The second benefit is of course the Python part because this program is quite tricky to build even

20
00:01:44,550 --> 00:01:48,180
though it's less than 30 lines of code.

21
00:01:48,180 --> 00:01:55,410
Here we're focusing on file manipulation and working with dates and times and also the aspect of 

22
00:01:55,410 --> 00:02:01,080
running a Python program as a process in the background which is something we haven't yet learned in

23
00:02:01,140 --> 00:02:02,260
the course.

24
00:02:02,490 --> 00:02:10,250
And yeah, I'll do a quick demo now of the program. This is the program so it's a python script, a dot py

25
00:02:10,280 --> 00:02:15,870
script which later if you want to you can attach to a graphical user interface if you want to

26
00:02:15,870 --> 00:02:23,160
give it to other people who don't know Python. And this Pythonb script runs as soon as your computer starts.

27
00:02:23,170 --> 00:02:23,620

28

00:02:24,060 --> 00:02:27,900
So now, this program, this Python script is actually runing

29
00:02:30,630 --> 00:02:35,060
as a process as you can see this is the program running.

30
00:02:35,310 --> 00:02:40,550
And you also see that this occupies very little space actually.

31
00:02:40,680 --> 00:02:49,650
For instance if you compare this with other processes like Chrome the browser you see that this is very

32
00:02:50,160 --> 00:02:57,780
very insignificant which means that you can have the program run continuously on your computer and it will

33
00:02:57,780 --> 00:02:59,400
not cause any problem.

34
00:02:59,490 --> 00:03:01,150
So the program is running.

35
00:03:01,170 --> 00:03:10,600
And if you try now to access Facebook for instance you've got this site can be can not be reached.

36
00:03:10,770 --> 00:03:12,260
Same for hotmail.

37
00:03:12,260 --> 00:03:16,680
So I have a hotmail account so I blocked that too.

38
00:03:16,950 --> 00:03:23,850
That means I have to go back to work making up my mind that it's not the time to spend on such things

39
00:03:24,220 --> 00:03:25,440
right now.

40
00:03:25,440 --> 00:03:30,350
Maybe after six o'clock I can browse those websites if I want.

41
00:03:30,780 --> 00:03:32,460
And yeah that's about it.

42
00:03:32,610 --> 00:03:37,450
I know you probably have not much idea on how to start with this.

43
00:03:37,890 --> 00:03:44,320
And I understand you but I'll explain the architecture of the program in the next lecture and then start

44
00:03:44,320 --> 00:03:45,170
building it.

45
00:03:45,380 --> 00:03:47,790
So see you in the next lecture.

