-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
176 lines (149 loc) · 9.42 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html prefix="og: http://ogp.me/ns# article: http://ogp.me/ns/article#
" lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="
A journal on my experiences and struggles applying software engineering best
practices and thoughts on my software development projects.
">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Software development brain teasers</title>
<link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/baguetteBox.min.css" rel="stylesheet" type="text/css">
<link href="assets/css/rst.css" rel="stylesheet" type="text/css">
<link href="assets/css/code.css" rel="stylesheet" type="text/css">
<link href="assets/css/theme.css" rel="stylesheet" type="text/css">
<meta name="theme-color" content="bleu">
<meta name="generator" content="Nikola (getnikola.com)">
<link rel="alternate" type="application/rss+xml" title="RSS" href="rss.xml">
<link rel="canonical" href="https://peristeri.github.io/">
<!--[if lt IE 9]><script src="assets/js/html5.js"></script><![endif]--><link rel="prefetch" href="blog/tips-on-onboarding-developers/" type="text/html">
</head>
<body>
<a href="#content" class="sr-only sr-only-focusable">Skip to main content</a>
<!-- Menubar -->
<nav class="navbar navbar-expand-md static-top mb-4
navbar-dark bg-dark
"><div class="container">
<!-- This keeps the margins nice -->
<a class="navbar-brand" href="https://peristeri.github.io/">
<span id="blog-title">Software development brain teasers</span>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#bs-navbar" aria-controls="bs-navbar" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="bs-navbar">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a href="resume/" class="nav-link">About Me</a>
</li>
<li class="nav-item">
<a href="https://github.com/peristeri" class="nav-link">Github</a>
</li>
<li class="nav-item">
<a href="https://twitter.com/peristerakis" class="nav-link">Twitter</a>
</li>
<li class="nav-item">
<a href="categories/" class="nav-link">Categories</a>
</li>
<li class="nav-item">
<a href="archive.html" class="nav-link">Archive</a>
</li>
<li class="nav-item">
<a href="rss.xml" class="nav-link">RSS feed</a>
</li>
</ul>
<ul class="navbar-nav navbar-right"></ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav><!-- End of Menubar --><div class="container" id="content" role="main">
<div class="body-content">
<!--Body content-->
<div class="postindex">
<article class="h-entry post-text" itemscope="itemscope" itemtype="http://schema.org/Article"><header><h1 class="p-name entry-title"><a href="blog/tips-on-onboarding-developers/" class="u-url">Tips on on-boarding developers</a></h1>
<div class="metadata">
<p class="byline author vcard"><span class="byline-name fn" itemprop="author">
George Peristerakis
</span></p>
<p class="dateline">
<a href="blog/tips-on-onboarding-developers/" rel="bookmark">
<time class="published dt-published" datetime="2019-08-21T12:00:00Z" itemprop="datePublished" title="8/21/19, 12:00 PM">8/21/19, 12:00 PM</time><span class="updated"> (updated
<time class="dt-updated" datetime="2019-08-22T12:00:00Z" itemprop="dateUpdated" title="8/22/19, 12:00 PM">8/22/19, 12:00 PM</time>)</span>
</a>
</p>
<p class="commentline">
<a href="blog/tips-on-onboarding-developers/#disqus_thread" data-disqus-identifier="cache/posts/tips-on-onboarding-developers.html">Comments</a>
</p>
</div>
</header><div class="p-summary entry-summary">
<div>
<p>Working in many different companies, I can define the on-boarding process as an
awkward first date. Trying to feel out what I need to do and what is expected.
These are the tips to help senior developers and management build a constructive
relationship.</p>
<div class="figure">
<img alt="https://imgs.xkcd.com/comics/job_interview.png" class="img-fluid" src="https://imgs.xkcd.com/comics/job_interview.png"><p class="caption">What it feels like when starting working in a new company.</p>
</div>
<p class="more"><a href="blog/tips-on-onboarding-developers/">Read more…</a></p>
</div>
</div>
</article><article class="h-entry post-text" itemscope="itemscope" itemtype="http://schema.org/Article"><header><h1 class="p-name entry-title"><a href="blog/mongo-change-data-type/" class="u-url">Change the data type dynamically in mongo</a></h1>
<div class="metadata">
<p class="byline author vcard"><span class="byline-name fn" itemprop="author">
George Peristerakis
</span></p>
<p class="dateline">
<a href="blog/mongo-change-data-type/" rel="bookmark">
<time class="published dt-published" datetime="2019-07-29T12:00:00Z" itemprop="datePublished" title="7/29/19, 12:00 PM">7/29/19, 12:00 PM</time></a>
</p>
<p class="commentline">
<a href="blog/mongo-change-data-type/#disqus_thread" data-disqus-identifier="cache/posts/mongo-change-data-type.html">Comments</a>
</p>
</div>
</header><div class="p-summary entry-summary">
<div>
<p>I'm using mongo DB to initially store data I scraped from the web. And like all
good projects, I realized that I was storing a date value as a string. I
corrected the code, but now I have a field that haves the values stored as a
string and date object.</p>
<pre class="code javascript"><a name="rest_code_18c45cec5b564f0a959202103877ccc8-1"></a><span class="nx">use</span> <span class="nx">scraped_db</span>
<a name="rest_code_18c45cec5b564f0a959202103877ccc8-2"></a>
<a name="rest_code_18c45cec5b564f0a959202103877ccc8-3"></a><span class="kd">var</span> <span class="nx">cursor</span> <span class="o">=</span> <span class="nx">db</span><span class="p">.</span><span class="nx">scraped_collection</span><span class="p">.</span><span class="nx">find</span><span class="p">({</span><span class="s1">'datePosted'</span><span class="o">:</span> <span class="p">{</span><span class="nx">$type</span><span class="o">:</span> <span class="s1">'string'</span><span class="p">}});</span>
<a name="rest_code_18c45cec5b564f0a959202103877ccc8-4"></a><span class="k">while</span> <span class="p">(</span><span class="nx">cursor</span><span class="p">.</span><span class="nx">hasNext</span><span class="p">())</span> <span class="p">{</span>
<a name="rest_code_18c45cec5b564f0a959202103877ccc8-5"></a> <span class="kd">var</span> <span class="nx">doc</span> <span class="o">=</span> <span class="nx">cursor</span><span class="p">.</span><span class="nx">next</span><span class="p">();</span>
<a name="rest_code_18c45cec5b564f0a959202103877ccc8-6"></a> <span class="nx">db</span><span class="p">.</span><span class="nx">scraped_collection</span><span class="p">.</span><span class="nx">update</span><span class="p">(</span>
<a name="rest_code_18c45cec5b564f0a959202103877ccc8-7"></a> <span class="p">{</span> <span class="s1">'_id'</span><span class="o">:</span> <span class="nx">doc</span><span class="p">.</span><span class="nx">_id</span><span class="p">},</span>
<a name="rest_code_18c45cec5b564f0a959202103877ccc8-8"></a> <span class="p">{</span> <span class="nx">$set</span><span class="o">:</span> <span class="p">{</span><span class="nx">datePosted</span><span class="o">:</span> <span class="k">new</span> <span class="nx">ISODate</span><span class="p">(</span><span class="nx">doc</span><span class="p">.</span><span class="nx">datePosted</span><span class="p">)</span> <span class="p">}</span> <span class="p">}</span>
<a name="rest_code_18c45cec5b564f0a959202103877ccc8-9"></a> <span class="p">)</span>
</pre>
<p>Simple and straight forward.</p>
<p>Happy hacking.</p>
</div>
</div>
</article>
</div>
<script>var disqus_shortname="pyypcom";(function(){var a=document.createElement("script");a.async=true;a.src="https://"+disqus_shortname+".disqus.com/count.js";(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(a)}());</script><!--End of body content--><footer id="footer"><div>
Contents © 2019 <a href="#">George Peristerakis</a>
</div>
<div>
<a rel="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/">
<img alt="Creative Commons License BY-NC-SA" style="border-width:0; margin-bottom:12px;" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png"></a>
</div>
</footer>
</div>
</div>
<script src="assets/js/jquery.min.js"></script><script src="assets/js/popper.min.js"></script><script src="assets/js/bootstrap.min.js"></script><script src="assets/js/baguetteBox.min.js"></script><script src="assets/js/moment-with-locales.min.js"></script><script src="assets/js/fancydates.min.js"></script><!-- fancy dates --><script>
moment.locale("en");
fancydates(2, "dddd, MMMM Do YYYY");
</script><!-- end fancy dates --><script>
baguetteBox.run('div#content', {
ignoreClass: 'islink',
captions: function(element) {
return element.getElementsByTagName('img')[0].alt;
}});
</script>
</body>
</html>