mirror of
https://github.com/wahyd4/wahyd4.github.com.git
synced 2026-08-09 13:26:14 +10:00
1272 lines
61 KiB
HTML
1272 lines
61 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width">
|
||
<meta name="theme-color" content="#222"><meta name="generator" content="Hexo 6.3.0">
|
||
|
||
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
|
||
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
|
||
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
|
||
<link rel="mask-icon" href="/images/logo.svg" color="#222">
|
||
|
||
<link rel="stylesheet" href="/css/main.css">
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/7.0.0/css/all.min.css" integrity="sha256-VHqXKFhhMxcpubYf9xiWdCiojEbY9NexQ4jh8AxbvcM=" crossorigin="anonymous">
|
||
|
||
<script class="next-config" data-name="main" type="application/json">{"hostname":"toozhao.com","root":"/","images":"/images","scheme":"Muse","darkmode":false,"version":"8.28.0","exturl":false,"sidebar":{"position":"left","width_expanded":320,"width_dual_column":240,"display":"post","padding":18,"offset":12,"b2t":true,"scrollpercent":true},"hljswrap":true,"codeblock":{"theme":{"light":"default","dark":"stackoverflow-dark"},"prism":{"light":"prism","dark":"prism-dark"},"copy_button":{"enable":true,"style":"mac"},"fold":{"enable":false,"height":500},"language":false},"bookmark":{"enable":true,"color":"#222","save":"auto"},"mediumzoom":true,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"stickytabs":false,"motion":{"enable":false,"async":false,"duration":200,"transition":{"menu_item":"fadeInDown","post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果:${query}","hits_time":"找到 ${hits} 个搜索结果(用时 ${time} 毫秒)","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"top_n_per_article":5,"unescape":false,"preload":false,"trigger":"auto"}}</script><script src="/js/config.js" defer></script>
|
||
|
||
<meta name="description" content="分享编程、运维、生活与思考">
|
||
<meta property="og:type" content="website">
|
||
<meta property="og:title" content="大染志">
|
||
<meta property="og:url" content="https://toozhao.com/page/3/">
|
||
<meta property="og:site_name" content="大染志">
|
||
<meta property="og:description" content="分享编程、运维、生活与思考">
|
||
<meta property="og:locale" content="zh_CN">
|
||
<meta property="article:author" content="Junv">
|
||
<meta property="article:tag" content="junv, wahyd4, blog, toozhao, 大染志">
|
||
<meta name="twitter:card" content="summary">
|
||
|
||
|
||
<link rel="canonical" href="https://toozhao.com/page/3/">
|
||
|
||
|
||
<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":true,"isPost":false,"lang":"zh-CN","comments":"","permalink":"","path":"page/3/index.html","title":""}</script>
|
||
|
||
<script class="next-config" data-name="calendar" type="application/json">""</script>
|
||
<title>大染志</title>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous" defer></script>
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/medium-zoom/1.1.0/medium-zoom.min.js" integrity="sha256-ZgMyDAIYDYGxbcpJcfUnYwNevG/xi9OHKaR/8GK+jWc=" crossorigin="anonymous" defer></script>
|
||
<script src="/js/utils.js" defer></script><script src="/js/sidebar.js" defer></script><script src="/js/next-boot.js" defer></script><script src="/js/bookmark.js" defer></script>
|
||
|
||
<script src="https://cdnjs.cloudflare.com/ajax/libs/hexo-generator-searchdb/1.5.0/search.js" integrity="sha256-xFC6PJ82SL9b3WkGjFavNiA9gm5z6UBxWPiu4CYjptg=" crossorigin="anonymous" defer></script>
|
||
<script src="/js/third-party/search/local-search.js" defer></script>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<style>
|
||
/* =========================================================
|
||
Toozhao blog custom styles (injected via head.njk)
|
||
阅读体验优化 — 微信读书风格
|
||
========================================================= */
|
||
html { scroll-behavior: smooth; }
|
||
|
||
/* 主内容阅读宽度 */
|
||
.post-block, .posts-expand .post-block {
|
||
max-width: 760px;
|
||
}
|
||
|
||
.post-title {
|
||
font-size: 1.7em;
|
||
font-weight: 700;
|
||
letter-spacing: 0.01em;
|
||
}
|
||
|
||
.post-meta { color: #999; font-size: 0.9em; }
|
||
|
||
.post-body {
|
||
font-size: 1.05em;
|
||
line-height: 1.9;
|
||
letter-spacing: 0.02em;
|
||
color: #333;
|
||
}
|
||
.post-body p {
|
||
margin: 1.1em 0;
|
||
text-align: justify;
|
||
text-justify: inter-ideograph;
|
||
}
|
||
.post-body h1, .post-body h2, .post-body h3, .post-body h4, .post-body h5, .post-body h6 {
|
||
line-height: 1.4;
|
||
margin-top: 1.6em;
|
||
margin-bottom: 0.8em;
|
||
font-weight: 600;
|
||
color: #222;
|
||
}
|
||
.post-body h2::before, .post-body h3::before, .post-body h4::before {
|
||
content: '';
|
||
display: inline-block;
|
||
width: 4px;
|
||
height: 0.9em;
|
||
background: #4a90d9;
|
||
border-radius: 2px;
|
||
margin-right: 10px;
|
||
vertical-align: -0.08em;
|
||
}
|
||
.post-body img {
|
||
border-radius: 8px;
|
||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
|
||
margin: 0.6em auto;
|
||
display: block;
|
||
max-width: 100%;
|
||
}
|
||
.post-body blockquote {
|
||
border-left: 4px solid #4a90d9;
|
||
background: rgba(74, 144, 217, 0.06);
|
||
margin: 1.4em 0;
|
||
padding: 0.8em 1.2em;
|
||
border-radius: 0 8px 8px 0;
|
||
color: #555;
|
||
}
|
||
.post-body blockquote p { margin: 0.4em 0; }
|
||
.post-body a {
|
||
color: #2d6cdf;
|
||
border-bottom: 1px solid rgba(45, 108, 223, 0.3);
|
||
transition: color 0.2s, border-color 0.2s;
|
||
}
|
||
.post-body a:hover { color: #1a4fae; border-bottom-color: #1a4fae; }
|
||
.post-body code {
|
||
background: rgba(0, 0, 0, 0.05);
|
||
border-radius: 4px;
|
||
padding: 2px 6px;
|
||
font-size: 0.9em;
|
||
color: #c7254e;
|
||
}
|
||
.post-body table {
|
||
border-collapse: collapse;
|
||
margin: 1.2em auto;
|
||
font-size: 0.95em;
|
||
}
|
||
.post-body table th, .post-body table td {
|
||
border: 1px solid #ddd;
|
||
padding: 8px 14px;
|
||
}
|
||
.post-body table th { background: #f5f7fa; font-weight: 600; }
|
||
.post-body table tr:nth-child(even) { background: #fafbfc; }
|
||
.post-body ul, .post-body ol { padding-left: 1.6em; margin: 0.8em 0; }
|
||
.post-body ul li, .post-body ol li { margin: 0.35em 0; }
|
||
.post-body hr {
|
||
border: none;
|
||
border-top: 1px dashed #ccc;
|
||
margin: 2em auto;
|
||
width: 60%;
|
||
}
|
||
|
||
/* 暗色模式(跟随系统,不依赖 NexT darkmode class) */
|
||
@media (prefers-color-scheme: dark) {
|
||
body { background: #1b1f24; color: #c8cdd3; }
|
||
.post-body { color: #c8cdd3; }
|
||
.post-body h1, .post-body h2, .post-body h3, .post-body h4, .post-body h5, .post-body h6 { color: #e8eaed; }
|
||
.post-body blockquote { background: rgba(74, 144, 217, 0.1); color: #9aa5b1; }
|
||
.post-body code { background: rgba(255, 255, 255, 0.1); color: #e88388; }
|
||
.post-body table th, .post-body table td { border-color: #3a3f45; }
|
||
.post-body table th { background: #2d3238; }
|
||
.post-body table tr:nth-child(even) { background: #262a2f; }
|
||
.post-meta { color: #777; }
|
||
}
|
||
|
||
::selection { background: rgba(74, 144, 217, 0.25); }
|
||
|
||
/* 字体调节按钮 */
|
||
.font-size-control {
|
||
position: fixed;
|
||
right: 18px;
|
||
bottom: 90px;
|
||
z-index: 1000;
|
||
background: rgba(0, 0, 0, 0.65);
|
||
color: #fff;
|
||
border-radius: 20px;
|
||
padding: 6px 4px;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
user-select: none;
|
||
}
|
||
.font-size-control button {
|
||
background: none;
|
||
border: none;
|
||
color: #fff;
|
||
font-size: 13px;
|
||
cursor: pointer;
|
||
padding: 3px 8px;
|
||
opacity: 0.85;
|
||
}
|
||
.font-size-control button:hover { opacity: 1; }
|
||
</style>
|
||
|
||
<noscript>
|
||
<link rel="stylesheet" href="/css/noscript.css">
|
||
</noscript>
|
||
</head>
|
||
|
||
<body itemscope itemtype="http://schema.org/WebPage">
|
||
<div class="headband"></div>
|
||
|
||
<main class="main">
|
||
<div class="column">
|
||
<header class="header" itemscope itemtype="http://schema.org/WPHeader"><div class="site-brand-container">
|
||
<div class="site-nav-toggle">
|
||
<div class="toggle" aria-label="切换导航栏" role="button">
|
||
<span class="toggle-line"></span>
|
||
<span class="toggle-line"></span>
|
||
<span class="toggle-line"></span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="site-meta">
|
||
|
||
<a href="/" class="brand" rel="start">
|
||
<i class="logo-line"></i>
|
||
<h1 class="site-title">大染志</h1>
|
||
<i class="logo-line"></i>
|
||
</a>
|
||
<p class="site-subtitle" itemprop="description">Junv's blog</p>
|
||
</div>
|
||
|
||
<div class="site-nav-right">
|
||
<div class="toggle popup-trigger" aria-label="搜索" role="button">
|
||
<i class="fa fa-search fa-fw fa-lg"></i>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<nav class="site-nav">
|
||
<ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类</a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档</a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a></li>
|
||
<li class="menu-item menu-item-search">
|
||
<a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
|
||
</a>
|
||
</li>
|
||
</ul>
|
||
</nav>
|
||
|
||
|
||
|
||
<div class="search-pop-overlay">
|
||
<div class="popup search-popup">
|
||
<div class="search-header">
|
||
<span class="search-icon">
|
||
<i class="fa fa-search"></i>
|
||
</span>
|
||
<div class="search-input-container">
|
||
<input autocomplete="off" autocapitalize="off" maxlength="80"
|
||
placeholder="搜索..." spellcheck="false"
|
||
type="search" class="search-input">
|
||
</div>
|
||
<span class="popup-btn-close" role="button">
|
||
<i class="fa fa-times-circle"></i>
|
||
</span>
|
||
</div>
|
||
<div class="search-result-container">
|
||
<div class="search-result-icon">
|
||
<i class="fa fa-spinner fa-pulse fa-5x"></i>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
</header>
|
||
|
||
|
||
<aside class="sidebar">
|
||
|
||
<div class="sidebar-inner sidebar-overview-active">
|
||
<ul class="sidebar-nav">
|
||
<li class="sidebar-nav-toc">
|
||
文章目录
|
||
</li>
|
||
<li class="sidebar-nav-overview">
|
||
站点概览
|
||
</li>
|
||
</ul>
|
||
|
||
<div class="sidebar-panel-container">
|
||
<!--noindex-->
|
||
<div class="post-toc-wrap sidebar-panel">
|
||
</div>
|
||
<!--/noindex-->
|
||
|
||
<div class="site-overview-wrap sidebar-panel">
|
||
<div class="site-author animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||
<img class="site-author-image" itemprop="image" alt="Junv"
|
||
src="/images/avatar.gif">
|
||
<p class="site-author-name" itemprop="name">Junv</p>
|
||
<div class="site-description" itemprop="description">分享编程、运维、生活与思考</div>
|
||
</div>
|
||
<div class="site-state-wrap animated">
|
||
<nav class="site-state">
|
||
<div class="site-state-item site-state-posts">
|
||
<a href="/archives/">
|
||
<span class="site-state-item-count">310</span>
|
||
<span class="site-state-item-name">日志</span>
|
||
</a>
|
||
</div>
|
||
<div class="site-state-item site-state-tags">
|
||
<a href="/tags/">
|
||
<span class="site-state-item-count">249</span>
|
||
<span class="site-state-item-name">标签</span></a>
|
||
</div>
|
||
</nav>
|
||
</div>
|
||
<div class="links-of-author animated">
|
||
<span class="links-of-author-item">
|
||
<a href="https://github.com/wahyd4" title="GitHub → https://github.com/wahyd4" rel="noopener me" target="_blank"><i class="fab fa-github fa-fw"></i>GitHub</a>
|
||
</span>
|
||
</div>
|
||
<div class="cc-license animated" itemprop="license">
|
||
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/" class="cc-opacity" rel="noopener" target="_blank"><img src="https://cdnjs.cloudflare.com/ajax/libs/creativecommons-vocabulary/2020.11.3/assets/license_badges/small/by_nc_sa.svg" alt="Creative Commons"></a>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
</aside>
|
||
|
||
|
||
</div>
|
||
|
||
<div class="main-inner index posts-expand">
|
||
|
||
|
||
|
||
|
||
<div class="post-block">
|
||
|
||
|
||
|
||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
|
||
<link itemprop="mainEntityOfPage" href="https://toozhao.com/2013/05/16/uama/">
|
||
|
||
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||
<meta itemprop="image" content="/images/avatar.gif">
|
||
<meta itemprop="name" content="Junv">
|
||
</span>
|
||
|
||
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
||
<meta itemprop="name" content="大染志">
|
||
<meta itemprop="description" content="分享编程、运维、生活与思考">
|
||
</span>
|
||
|
||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||
<meta itemprop="name" content=" | 大染志">
|
||
<meta itemprop="description" content="">
|
||
</span>
|
||
<header class="post-header">
|
||
<h2 class="post-title" itemprop="name headline">
|
||
<a href="/2013/05/16/uama/" class="post-title-link" itemprop="url">记'U'项目</a>
|
||
</h2>
|
||
|
||
<div class="post-meta-container">
|
||
<div class="post-meta">
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">发表于</span>
|
||
|
||
<time title="创建时间:2013-05-17 07:18:00" itemprop="dateCreated datePublished" datetime="2013-05-17T07:18:00+10:00">2013-05-17</time>
|
||
</span>
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar-check"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">更新于</span>
|
||
<time title="修改时间:2026-08-04 20:47:21" itemprop="dateModified" datetime="2026-08-04T20:47:21+10:00">2026-08-04</time>
|
||
</span>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class="post-body" itemprop="articleBody">
|
||
<p>U(省去真名)是我进公司以来的第一个交付项目,与他相遇也应该用巧来形容,因为原本我们应该去另外一个项目的。当听到我马上要做的项目是五马时,还是很高兴,毕竟我马上就可以上我的第一个项目了。不过心里面也有些疑惑,因为这个项目基本上是处理偏向前端的项目,去调用后台提供的服务,我们本身不提供任何数据的持久化操作或者对外提供服务。不过的确这个项目相比与公司内部的其他项目真的算小的了。我们团队总共4个人,外加澳洲share的两位同事吧。时间也只有3个月左右。不过由于这个项目是从0开始做,而且是大牛@Jeff带着我开发,我学到了很多东西,不仅仅是编程,更是如何去进行敏捷项目的开发,如何推动敏捷项目的正常的进行,如何在团队之中发挥作用。<br>我们的团队成员:大熊、弘、梦秋、以及在项目shadow过一段时间的青。</p>
|
||
<ul>
|
||
<li><a target="_blank" rel="noopener" href="http://gigix.thoughtworkers.org/">大熊</a>,技术大牛,不仅仅教会我们了如何写好代码,他在很多时候,还把一些事情放给我让我去track、去push,并告诉我怎么样去和澳洲的同事、同事沟通、合作才能把这些事做好。在他的丰富的经验的熏陶和潜移默化之下,我感受和体会颇多。</li>
|
||
<li>弘,我们项目的QA兼职BA,看吧,从这点就可以看出我们项目的之小了吧。不过这也辛苦了孙弘了,感觉在我们团队里面又当爹又当妈的。感谢孙弘教我怎么样写测试用例才是最好的。</li>
|
||
<li>梦秋,从我们的Drupal Team过来的孩纸,比我早一年的公司,我们项目的大部分前端的架子都是她搭起来的,在她身上我也学到了很多前端方面的知识,我想我再也不会胡乱的写css selector了。梦秋童鞋有一股很较真的劲。</li>
|
||
<li>青,在项目中途进来的孩纸,谢谢你免费帮我们项目做了这么多Story,也恭喜你马上就Billable了。</li>
|
||
</ul>
|
||
<p>在项目中要求的几点,从项目开始到现在,我觉得是很有感触的:</p>
|
||
<ul>
|
||
<li>代码测试覆盖率100%。的确,如果我们是真正严格按照测试驱动开发,先写测试代码,再实现,基本上是不会遇到测试覆盖率不过的(基本上>=90%)。你也许会说,如果遇到某些方法不能测试怎么办,在项目中我遇到过两三次觉得代码不能测试的情况。但是由于我们的测试覆盖率要求100%,所以我不得不去寻找测试代码的方法,所以即使经过多次尝试最后发现代码的确不太好测试,那么我对那段代码也是相当熟悉了,也基本上保证了代码的正确性。当然最后面对那个我认为不能测试的方法,我写了一个很屎的代码去通过覆盖率要求。但绝大多数最初我认为不能测试的代码,最终都表明是可以测试的。比如Spring中的 HandlerInterceptorAdaptor。</li>
|
||
<li>大熊的三层设计:如何测试系统的外部服务,同时还要保证外部服务挂掉的时候,不影响我们正常的开发。用Integration Test保证外部服务的真实、正常、可用性,用本地的缓存的真实的服务器相应数据来进行一般的本地代码的测试。用Mockito来进行controller级别的测试。为了保证我们本地的应用可以正常跑起来运行,我们还用了校长<a target="_blank" rel="noopener" href="http://dreamhead.blogbus.com/">@dreamhead</a>开发的<a target="_blank" rel="noopener" href="https://github.com/dreamhead/moco">Moco</a>,保证我们本地的应用可以正常运行和测试的。更详细的文档可以看大熊写的两篇文档<a target="_blank" rel="noopener" href="http://gigix.thoughtworkers.org/2013/3/6/javaee-best-practices">《都是为了半夜能提交》1,2</a>。我也希望后面可以另外写博客用自己的话讲述我们在项目中怎么做这些测试的。</li>
|
||
</ul>
|
||
<p>在这个项目中,当大熊不在的两周,我们剩下的人需要负责更多的事,以前可能很多问题需要找大熊才能解决的,现在也许就需要我自己来处理了。不过所幸的是,经过和澳洲的同事打电话,聊天,两天下班以后加了点小班,问题都被一一搞定。这两周也是我最独立、主动的两周。承担了应该承担的Responsibility。<br>在这个项目期间,我看了《Rework》和《程序员职业素养》这两本书,也对程序员的身份有了更多的认识。让我明白,一个程序员需要对自己写的代码负责,而不是写一坨自己都不认识的屎。<br>当前天得知自己马上就要离开小组时,刹那间突然很舍不得,舍不得这个团队,舍不得自己写的那些代码。不过,从一个项目到另一个项目是很正常的,项目总有自己的生命周期,把他当作是一个学期的大学课程就好了。这学期快结束了,下学期也不远了。<br>下周星期一就到新项目了。加油!恨自己,写得那么烂的文字。</p>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="post-footer">
|
||
<div class="post-eof"></div>
|
||
|
||
</footer>
|
||
</article>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="post-block">
|
||
|
||
|
||
|
||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
|
||
<link itemprop="mainEntityOfPage" href="https://toozhao.com/2013/03/13/some-thougts-after-reading-big-data/">
|
||
|
||
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||
<meta itemprop="image" content="/images/avatar.gif">
|
||
<meta itemprop="name" content="Junv">
|
||
</span>
|
||
|
||
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
||
<meta itemprop="name" content="大染志">
|
||
<meta itemprop="description" content="分享编程、运维、生活与思考">
|
||
</span>
|
||
|
||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||
<meta itemprop="name" content=" | 大染志">
|
||
<meta itemprop="description" content="">
|
||
</span>
|
||
<header class="post-header">
|
||
<h2 class="post-title" itemprop="name headline">
|
||
<a href="/2013/03/13/some-thougts-after-reading-big-data/" class="post-title-link" itemprop="url">《大数据》读后感</a>
|
||
</h2>
|
||
|
||
<div class="post-meta-container">
|
||
<div class="post-meta">
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">发表于</span>
|
||
|
||
<time title="创建时间:2013-03-14 08:37:00" itemprop="dateCreated datePublished" datetime="2013-03-14T08:37:00+11:00">2013-03-14</time>
|
||
</span>
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar-check"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">更新于</span>
|
||
<time title="修改时间:2026-08-04 20:47:21" itemprop="dateModified" datetime="2026-08-04T20:47:21+10:00">2026-08-04</time>
|
||
</span>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class="post-body" itemprop="articleBody">
|
||
<p>两周前,我拿到了从日本买的Kindle PaperWhite,买这个东西最主要的原因是因为是希望自己可以多读一点书,当然还希望眼睛可以不受什么伤害。然后用这个东西读完的第一本书便是《大数据》。<br>没读之前,想这本书可能讲的是,教我们如何在当今这个时代,开始去挖掘、使用身边的各种各样的大数据,并从其中发现商机。但其实这本书主要讲的是全世界那些成功使用大数据的实例,我们可以看到很多商业公司利用大数据给用户提供了分析和预测的功能,并创造出很大的商业价值。此外我们还可以看到不少政府机构或者其他一些组织也在开始大数据解决他们遇到的一些问题。在本书的最后一章,作者告诉了我们大数据可能带来的坏处。如:通过大数据可能我们的个人各种信息、隐私会很容易地被大数据的拥有者找到,这些信息,可能被政府用来监管我们等;通过大数据可以预测可能发生的事,或者预测我们人个人本书即将做的行为,书中有个例子:警察通过大数据分析得出一个人即将可能犯罪,并把它逮捕了,但事实上这个人现在并没有犯罪。也许这就限制、约束了我们个人的自由。<br>看完这本书,颠覆了自己之前的一些想法:</p>
|
||
<ul>
|
||
<li>以前我们认为错误的数据是没有用,我们需要保证统计的数据的准确性,但是在大数据中,错误的数据也是有用的,它和其他所有相对正确的数据一起构成了整体,也就算不了什么了。我们同样可以从这些数据中得出比较正确的预测和分析。</li>
|
||
<li>Google利用人们搜索的关键字来预测和判断某个地区是否发生流感,Google通过分析这个地区的人们搜索和流感有关的词的数量等来分析得出。</li>
|
||
<li>Google 从互联网抓取数以亿记的各种语言、各种翻译水平的翻译结果,使用其翻译出来的准确率比那些微软使用正确的词库翻译出来的句子准备率更高。<br>这样的例子在书中还有很多,这里不再列举。</li>
|
||
</ul>
|
||
<p>我自己的感想是,其实大数据无处不在,只要我们细心,我们就可以挖掘出身边的那些大数据,并做一些有意义的是,就像书中说的那样,我们不需要强求每条数据都那么真实准确,但是从大量的数据中我们就可以得出相对准备的结果。未来成功的公司必定是是那些拥有大量数据、并使用那些数据为大众提供服务的公司。</p>
|
||
<p>我们ITer 作为生活在大数据时代的幸运儿,都可以想想如何从身边获取一些数据,做一些很cool的实践!</p>
|
||
<p>原谅我的词拙。</p>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="post-footer">
|
||
<div class="post-eof"></div>
|
||
|
||
</footer>
|
||
</article>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="post-block">
|
||
|
||
|
||
|
||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
|
||
<link itemprop="mainEntityOfPage" href="https://toozhao.com/2013/02/06/libr/">
|
||
|
||
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||
<meta itemprop="image" content="/images/avatar.gif">
|
||
<meta itemprop="name" content="Junv">
|
||
</span>
|
||
|
||
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
||
<meta itemprop="name" content="大染志">
|
||
<meta itemprop="description" content="分享编程、运维、生活与思考">
|
||
</span>
|
||
|
||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||
<meta itemprop="name" content=" | 大染志">
|
||
<meta itemprop="description" content="">
|
||
</span>
|
||
<header class="post-header">
|
||
<h2 class="post-title" itemprop="name headline">
|
||
<a href="/2013/02/06/libr/" class="post-title-link" itemprop="url">开源图书借阅分享工具 Libr</a>
|
||
</h2>
|
||
|
||
<div class="post-meta-container">
|
||
<div class="post-meta">
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">发表于</span>
|
||
|
||
<time title="创建时间:2013-02-07 09:13:00" itemprop="dateCreated datePublished" datetime="2013-02-07T09:13:00+11:00">2013-02-07</time>
|
||
</span>
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar-check"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">更新于</span>
|
||
<time title="修改时间:2026-08-04 20:47:21" itemprop="dateModified" datetime="2026-08-04T20:47:21+10:00">2026-08-04</time>
|
||
</span>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class="post-body" itemprop="articleBody">
|
||
<p>Libr 的想法最初源自于我有一天希望从成都办公室图书馆找一本书。但是我从书架上找不到那本书,我也没办法知道图书馆到底有没有那本书,因为大家借书时,通常是靠自觉去在一个本子上填写借书记录,因此这个记录的可用价值并不高。我就想能不能有一个工具可以让我们查找到办公室有哪些书,现在可借吗,如果不可借,现在这本书又在哪位同事的手里面(跟踪书的去向)?<br>后来通过和熊节的交流,了解到办公室某些同事的确有这方面需求,有些同事还希望可以分享自己的书架或者读书清单。再加上从其他渠道收集到的一些想法,陆陆续续一个月左右,做了Libr 的最小可用版本。(昨天和梁越的交流,我又得到了很多新的,有趣的点子,将会在Road map 中体现)</p>
|
||
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">访问地址:http://libr.herokuapp.com/</span><br></pre></td></tr></table></figure>
|
||
|
||
<h5 id="主要的feature-:"><a href="#主要的feature-:" class="headerlink" title="主要的feature :"></a>主要的feature :</h5><ul>
|
||
<li>第三方登录集成(豆瓣、QQ)</li>
|
||
<li>首页书籍展示、简单的统计排名</li>
|
||
<li>系统中的书籍搜索</li>
|
||
<li>用户可以添加书籍到系统,目前是采用输入关键字和ISBN搜索书籍并添加。(目前添加书籍,即表明你分享此书籍)</li>
|
||
<li>用户可以删除自己已添加的书籍</li>
|
||
<li>用户借阅他人书籍</li>
|
||
<li>用户可以归还所借书籍</li>
|
||
<li>用户的书架展示(拥有的图书、借入的图书)</li>
|
||
<li>用户个人中心,简单的统计数据</li>
|
||
</ul>
|
||
<h4 id="注意:"><a href="#注意:" class="headerlink" title="注意:"></a>注意:</h4><ul>
|
||
<li>在系统中成都办公室也是以用户的形式存在</li>
|
||
<li>借书的流程为,用户首先在网站上查找是否有该书可借,点击借阅,系统将自动将该书的一本可用实例借出给用户。用户此时就可以线下去向拥有者借书(如果拥有者为成都办公室,用户即自行取书即可。),这里借书的逻辑是有待改进的,欢迎大家提建议。</li>
|
||
</ul>
|
||
<h5 id="Technical-Stack"><a href="#Technical-Stack" class="headerlink" title="Technical Stack:"></a>Technical Stack:</h5><figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">* 采用 ruby on rails 框架、 Postgres, 前端采用 bootstrap,含有部分ajax。图书数据从豆瓣获取。</span><br><span class="line">* 部署在 heroku 上面,为了得到较高的性能,开启了Gzip 和替换rails 内嵌服务器为 thin</span><br><span class="line">* 由于是个人开发,TDD做得并不好,代码覆盖率只有40%左右。(我承认我错了。。)</span><br><span class="line">* Github repo: https://github.com/wahyd4/Libr 欢迎大家一起来写。</span><br></pre></td></tr></table></figure>
|
||
|
||
<h4 id="Road-map"><a href="#Road-map" class="headerlink" title="Road map:"></a>Road map:</h4><ul>
|
||
<li><p>移动客户端的支持,用户可以在手机上查找图书,通过扫描二维码添加图书。</p>
|
||
</li>
|
||
<li><p>用户长时间借书未归还,自动提醒(邮件、微信?)</p>
|
||
</li>
|
||
<li><p>微信查书?</p>
|
||
</li>
|
||
<li><p>用户私有书架,用户可以选择不对外公开展示自己的书籍,只供自己查看。</p>
|
||
</li>
|
||
<li><p>为用户添加 组织、地址标签,方便借书与分享书时,选择最优方案。</p>
|
||
</li>
|
||
<li><p>用户可以创建书单,书单为一系列书的集合。如:java程序员必读的10本书。</p>
|
||
</li>
|
||
<li><p>用户可以选择开始读某一书单。并可以看到自己读这一书单的进度,以及需要向那些人借书,以及看到有多少其他人已经读了这个书单等等统计。用户读完书单,可以发布感想。如果扯远来:有书单,也就可以有 各种进度、统计、勋章、虚拟奖励等等。</p>
|
||
</li>
|
||
<li><p>各种深入的数据统计。如:某用户平均借书周期、哪段时间看书较多等等……</p>
|
||
</li>
|
||
<li><p>……. 等你们来补充</p>
|
||
<p>我做这个小东西的根本目的是希望方便大家借阅书籍、和分享自己私有的书籍给大家看。最终希望不仅仅是为公司的同事服务,如果可以也希望可以对外公开。欢迎各种讨论、吐槽,我菜鸟一个。rails 也写得很烂,希望大家多给意见,也特别特别欢迎有兴趣的和我一起来做这个小东西。总之跪求反馈!</p>
|
||
</li>
|
||
</ul>
|
||
<p><img src="/images/2013/2/libr.png" alt="'libr'"></p>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="post-footer">
|
||
<div class="post-eof"></div>
|
||
|
||
</footer>
|
||
</article>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="post-block">
|
||
|
||
|
||
|
||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
|
||
<link itemprop="mainEntityOfPage" href="https://toozhao.com/2013/02/01/update-ruby-on-mac-osx/">
|
||
|
||
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||
<meta itemprop="image" content="/images/avatar.gif">
|
||
<meta itemprop="name" content="Junv">
|
||
</span>
|
||
|
||
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
||
<meta itemprop="name" content="大染志">
|
||
<meta itemprop="description" content="分享编程、运维、生活与思考">
|
||
</span>
|
||
|
||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||
<meta itemprop="name" content=" | 大染志">
|
||
<meta itemprop="description" content="">
|
||
</span>
|
||
<header class="post-header">
|
||
<h2 class="post-title" itemprop="name headline">
|
||
<a href="/2013/02/01/update-ruby-on-mac-osx/" class="post-title-link" itemprop="url">更新Mac OSX 中Ruby到最新版本</a>
|
||
</h2>
|
||
|
||
<div class="post-meta-container">
|
||
<div class="post-meta">
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">发表于</span>
|
||
|
||
<time title="创建时间:2013-02-01 12:19:00" itemprop="dateCreated datePublished" datetime="2013-02-01T12:19:00+11:00">2013-02-01</time>
|
||
</span>
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar-check"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">更新于</span>
|
||
<time title="修改时间:2026-08-04 20:47:21" itemprop="dateModified" datetime="2026-08-04T20:47:21+10:00">2026-08-04</time>
|
||
</span>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class="post-body" itemprop="articleBody">
|
||
<p>大概一个月前,我拿到了公司发的Macbook Pro,但是这一个月中,似乎它有时会出点问题。Anyway, 这些都不重要。重要的是搞不懂苹果的新出的10.8 Mountain Lion 居然内置的Ruby 版本还是1.87。但是要用最近版本的Rails 版本的话,还是需要ruby 1.9以上的。因此我们需要将其更新。此文只是针对小白,和自己的一个记录,其他人可以忽略。<br>在Mac OSX 中,我们可以使用 Homebrew 和 rvm 来安装新的版本。homebrew 正如你官网介绍所说,是Mac 下的包安装管理工具。而rvm这是ruby的版本管理工具,这里当然最好选用 rvm.<br>首先我们需要需要登录苹果开发者中心,安装 <a target="_blank" rel="noopener" href="https://developer.apple.com/downloads/index.action">Command Line Tools</a>.<br>然后,我们在terminal中输入以下命令安装rvm:<br> \curl -L <a target="_blank" rel="noopener" href="https://get.rvm.io/">https://get.rvm.io</a> | bash -s stable –ruby<br>如果中途没有出错的话,系统将会安装最新的rvm 和最新的 ruby,如果没有成功安装ruby,你也可以手动使用:<br> rvm install ruby<br>来安装最新版本的ruby,系统并会自动切换到最新的ruby。<br>如果你在更新ruby的时候,也出现这样的错误,可以使用使用一下的命令行:<br> rvm get head<br> rvm requirements run<br>安装说需要,依赖的包,然后在使用下面的命令行安装ruby:<br> rvm install 1.9.3 –with-opt-dir=<code>brew --prefix readline</code> –without-tcl –without-tk<br>应该就成功了。So, enjoy.</p>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="post-footer">
|
||
<div class="post-eof"></div>
|
||
|
||
</footer>
|
||
</article>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="post-block">
|
||
|
||
|
||
|
||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
|
||
<link itemprop="mainEntityOfPage" href="https://toozhao.com/2013/01/21/fuck-gfw/">
|
||
|
||
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||
<meta itemprop="image" content="/images/avatar.gif">
|
||
<meta itemprop="name" content="Junv">
|
||
</span>
|
||
|
||
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
||
<meta itemprop="name" content="大染志">
|
||
<meta itemprop="description" content="分享编程、运维、生活与思考">
|
||
</span>
|
||
|
||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||
<meta itemprop="name" content=" | 大染志">
|
||
<meta itemprop="description" content="">
|
||
</span>
|
||
<header class="post-header">
|
||
<h2 class="post-title" itemprop="name headline">
|
||
<a href="/2013/01/21/fuck-gfw/" class="post-title-link" itemprop="url">无节操,无底线</a>
|
||
</h2>
|
||
|
||
<div class="post-meta-container">
|
||
<div class="post-meta">
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">发表于</span>
|
||
|
||
<time title="创建时间:2013-01-22 00:30:00" itemprop="dateCreated datePublished" datetime="2013-01-22T00:30:00+11:00">2013-01-22</time>
|
||
</span>
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar-check"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">更新于</span>
|
||
<time title="修改时间:2026-08-04 20:47:21" itemprop="dateModified" datetime="2026-08-04T20:47:21+10:00">2026-08-04</time>
|
||
</span>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class="post-body" itemprop="articleBody">
|
||
<p>真TM无节操,无底线,难道就因为一个插件使用了Github上的js文件,为了让12306工作得更好,就把Github干掉?<br>草草。。<br>我不能想出更荒唐的理由了。<br>Github作为一个IT技术网站,惹着谁啦?<br>要不直接吧海底光缆割断吧,这样就没有任何后顾之忧了。<br>Fuck。</p>
|
||
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">更新: 后面在各种影响之下,我们终于又可以上Github了。这是一件值得庆幸的事。 Really. </span><br></pre></td></tr></table></figure>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="post-footer">
|
||
<div class="post-eof"></div>
|
||
|
||
</footer>
|
||
</article>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="post-block">
|
||
|
||
|
||
|
||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
|
||
<link itemprop="mainEntityOfPage" href="https://toozhao.com/2013/01/20/my-relexing-ways/">
|
||
|
||
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||
<meta itemprop="image" content="/images/avatar.gif">
|
||
<meta itemprop="name" content="Junv">
|
||
</span>
|
||
|
||
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
||
<meta itemprop="name" content="大染志">
|
||
<meta itemprop="description" content="分享编程、运维、生活与思考">
|
||
</span>
|
||
|
||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||
<meta itemprop="name" content=" | 大染志">
|
||
<meta itemprop="description" content="">
|
||
</span>
|
||
<header class="post-header">
|
||
<h2 class="post-title" itemprop="name headline">
|
||
<a href="/2013/01/20/my-relexing-ways/" class="post-title-link" itemprop="url">我太急躁</a>
|
||
</h2>
|
||
|
||
<div class="post-meta-container">
|
||
<div class="post-meta">
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">发表于</span>
|
||
|
||
<time title="创建时间:2013-01-20 13:32:00" itemprop="dateCreated datePublished" datetime="2013-01-20T13:32:00+11:00">2013-01-20</time>
|
||
</span>
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar-check"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">更新于</span>
|
||
<time title="修改时间:2026-08-04 20:47:21" itemprop="dateModified" datetime="2026-08-04T20:47:21+10:00">2026-08-04</time>
|
||
</span>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class="post-body" itemprop="articleBody">
|
||
<p>我是一个很急躁的人,我想这没有什么可以质疑的。很多时候遇到我不能快速解决的问题,我会变得有点紧张、焦躁,我甚至不能静下心来完成自己手里面的事。我不知道是不是大多数急躁的人都差不多是这个样子。<br>关于这点,有些东西会让我自己变得很矛盾,我喜欢和很多人在一起玩耍,我喜欢热闹的感觉,但热闹与开心之后,我有很难快速冷静下来。每当我开心地玩了一个周末,我又会觉得罪孽深重,因为我没有做在这个周末里面没有做任何事。我就是如此纠结,纠结之人。<br>通常情况下,到晚上10点或者11点以后,我发现这个时候我变得比较平静,做事的效率也比较高,黑夜让我浮躁的心灵平静下来。<br>还记得高中,特别是高三的那段时间,时不时会特别浮躁,想快点结束那种生活,浮躁地看不下任何书,也很难听进课,当老师盯着我时,我也只会机械式的,附和的点点头。任时间流逝。<br>现在有时我也会面临着这样的情况,但我逐渐发现了一些让自己放松、冷静的方法。</p>
|
||
<ul>
|
||
<li>发呆,发呆也许是最简单,但却不怎么有效的方法。虽然我可以暂时什么事也不想,但让我变得冷静的这个过程会相对变得比较长。</li>
|
||
<li>听轻快的音乐,看愉快的电影。这些相对“简单”的东西,会让我冷静。</li>
|
||
<li>亲近大自然,这是我最喜欢的事情,但是也是相对不那么容易在短时间接触到的方式。当我坐在嘤鸣湖边,看着清澈、平静的湖水,以及湖面上那两三只闲适、快乐、悠然的野鸭时,什么都暂时不用想,就呆呆地看着这一切,体会着这一切。我想没有比这更让我平静的了。如果时间、金钱允许,我希望可以和自己爱的人一起去到处看看,让生命慢慢消融在大自然中。</li>
|
||
<li>运动,这也是让我转移注意力的一种方式,适当的锻炼会让我精力变得更加充沛,烦躁一扫空。</li>
|
||
</ul>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="post-footer">
|
||
<div class="post-eof"></div>
|
||
|
||
</footer>
|
||
</article>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="post-block">
|
||
|
||
|
||
|
||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
|
||
<link itemprop="mainEntityOfPage" href="https://toozhao.com/2013/01/04/use-jetty-maven-plugin-debug-webapp/">
|
||
|
||
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||
<meta itemprop="image" content="/images/avatar.gif">
|
||
<meta itemprop="name" content="Junv">
|
||
</span>
|
||
|
||
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
||
<meta itemprop="name" content="大染志">
|
||
<meta itemprop="description" content="分享编程、运维、生活与思考">
|
||
</span>
|
||
|
||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||
<meta itemprop="name" content=" | 大染志">
|
||
<meta itemprop="description" content="">
|
||
</span>
|
||
<header class="post-header">
|
||
<h2 class="post-title" itemprop="name headline">
|
||
<a href="/2013/01/04/use-jetty-maven-plugin-debug-webapp/" class="post-title-link" itemprop="url">使用jetty-maven-plugin快速调试webapp</a>
|
||
</h2>
|
||
|
||
<div class="post-meta-container">
|
||
<div class="post-meta">
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">发表于</span>
|
||
|
||
<time title="创建时间:2013-01-05 09:24:00" itemprop="dateCreated datePublished" datetime="2013-01-05T09:24:00+11:00">2013-01-05</time>
|
||
</span>
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar-check"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">更新于</span>
|
||
<time title="修改时间:2026-08-04 20:47:21" itemprop="dateModified" datetime="2026-08-04T20:47:21+10:00">2026-08-04</time>
|
||
</span>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class="post-body" itemprop="articleBody">
|
||
<p>在我们使用maven这个工具来进行web应用开发的使用,我们在Eclipse或者Intellij中几乎没有一种好的方式来快速调试我们的webapp。通常我们可能采取的做法是利用maven将应用打包成war文件,然后再放到tomcat或者jetty、Jboss等应用服务器中运行。但是这个速度的确有点慢,或者我们也可以使用maven-tomcat-plugin来使用maven将war部署到tomcat中运行,但是这种方案需要我们配置tomcat和手动运行tomcat。<br>现在我们其实可以使用jetty-maven-plugin来将一个内嵌的jetty和maven紧密结合。我们直接使用<code>mvn jetty:run</code>即可快速运行应用,而且还支持即改即用。<br>我们只需要在我们的pom.xml文件中的plugins节点中加入下面的代码即可:</p>
|
||
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">org.mortbay.jetty</span><br><span class="line">jetty-maven-plugin</span><br><span class="line"> 8.1.8.v20121106</span><br><span class="line"></span><br><span class="line"> 10</span><br><span class="line"> </span><br><span class="line"> /test</span><br><span class="line"> </span><br><span class="line"></span><br></pre></td></tr></table></figure>
|
||
|
||
<p>其中的参数contextPath,就是该应用的路径,你可以随便取一个即可。<br>然后你运行<code>mvn jetty:run</code> 你就可以在<a target="_blank" rel="noopener" href="http://localhost:8080/test">http://localhost:8080/test</a> 看到你的项目了。<br>需要注意的是该插件的6.x版本是不支持servlet3.0的,如果你的应用中有用到annotation来声明Servlet路径的话,就得选用7以后的版本。插件的版本大致和jetty server的版本是对应的。<br>当然这个插件还有更多详细的参数配置,你可以在<a target="_blank" rel="noopener" href="http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin">插件网站</a>找到。</p>
|
||
<figure class="highlight plaintext"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">链接: </span><br><span class="line">Jetty Maven Plugin : http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin</span><br></pre></td></tr></table></figure>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="post-footer">
|
||
<div class="post-eof"></div>
|
||
|
||
</footer>
|
||
</article>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="post-block">
|
||
|
||
|
||
|
||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
|
||
<link itemprop="mainEntityOfPage" href="https://toozhao.com/2013/01/03/2013-goal/">
|
||
|
||
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||
<meta itemprop="image" content="/images/avatar.gif">
|
||
<meta itemprop="name" content="Junv">
|
||
</span>
|
||
|
||
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
||
<meta itemprop="name" content="大染志">
|
||
<meta itemprop="description" content="分享编程、运维、生活与思考">
|
||
</span>
|
||
|
||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||
<meta itemprop="name" content=" | 大染志">
|
||
<meta itemprop="description" content="">
|
||
</span>
|
||
<header class="post-header">
|
||
<h2 class="post-title" itemprop="name headline">
|
||
<a href="/2013/01/03/2013-goal/" class="post-title-link" itemprop="url">2013 目标</a>
|
||
</h2>
|
||
|
||
<div class="post-meta-container">
|
||
<div class="post-meta">
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">发表于</span>
|
||
|
||
<time title="创建时间:2013-01-04 01:17:00" itemprop="dateCreated datePublished" datetime="2013-01-04T01:17:00+11:00">2013-01-04</time>
|
||
</span>
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar-check"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">更新于</span>
|
||
<time title="修改时间:2026-08-04 20:47:21" itemprop="dateModified" datetime="2026-08-04T20:47:21+10:00">2026-08-04</time>
|
||
</span>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class="post-body" itemprop="articleBody">
|
||
<p><img src="/images/2013/1/2013-goal.jpg" alt="2013 goal"></p>
|
||
<p>我会努力去实现这些目标,这一年是我真正工作的第一年,希望可以可以快速成长,做一个可以让其他人信任、依赖的人。</p>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="post-footer">
|
||
<div class="post-eof"></div>
|
||
|
||
</footer>
|
||
</article>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="post-block">
|
||
|
||
|
||
|
||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
|
||
<link itemprop="mainEntityOfPage" href="https://toozhao.com/2012/12/30/2012-review/">
|
||
|
||
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||
<meta itemprop="image" content="/images/avatar.gif">
|
||
<meta itemprop="name" content="Junv">
|
||
</span>
|
||
|
||
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
||
<meta itemprop="name" content="大染志">
|
||
<meta itemprop="description" content="分享编程、运维、生活与思考">
|
||
</span>
|
||
|
||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||
<meta itemprop="name" content=" | 大染志">
|
||
<meta itemprop="description" content="">
|
||
</span>
|
||
<header class="post-header">
|
||
<h2 class="post-title" itemprop="name headline">
|
||
<a href="/2012/12/30/2012-review/" class="post-title-link" itemprop="url">2012 Review</a>
|
||
</h2>
|
||
|
||
<div class="post-meta-container">
|
||
<div class="post-meta">
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">发表于</span>
|
||
|
||
<time title="创建时间:2012-12-31 06:49:00" itemprop="dateCreated datePublished" datetime="2012-12-31T06:49:00+11:00">2012-12-31</time>
|
||
</span>
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar-check"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">更新于</span>
|
||
<time title="修改时间:2026-08-04 20:47:21" itemprop="dateModified" datetime="2026-08-04T20:47:21+10:00">2026-08-04</time>
|
||
</span>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class="post-body" itemprop="articleBody">
|
||
<p><img src="/images/2012/12/2012.png" alt="2012 preview"><br>2012应该是我人生到目前为止成长最大的一年吧,也是因为这算是我第一年差不多脱离学校走向社会过度的一年吧。<br>对于生活方面来说,最大的感触就是:想象中的生活、社会没有这么复杂啊,是我自己以前想得太简单了。抛开复杂不谈,让我在为人处事方面也学到很多。我给自己的分析就是我可能说话太直接了,很多时候没有考虑到其他人的感受,碰到一些不太好的事,太想去出头为大家“伸张正义了”,却忘了自己只是一只小小鸟。所有在新的一年,我需要更多地倾听,吸收其他人做事方面好的地方,让自己成长,沉淀。</p>
|
||
<p>11月新到了公司,在Jeff 要求下,开始学习使用Ruby on rails 在进行开发,这门语言他的魅力深深吸引了我,也许是和Java 进行比较,它看起来是那么得特殊,这个框架太强大了,可以帮我干很多重复性的工作,他的智能可以让我直接使用很多语法来进行相关操作。它的简洁喝高效是Java所不能比的。但是我对Ruby 目前还没有形成很系统的只是掌握,这方面希望在2013年能够深入去学习Ruby语言。</p>
|
||
<p>进到Thoughtworks第一次被企业文化所震撼,是听李力严讲公司的 3P,那是在厨房吃水果的时候,他给我们聊Socail justice。讲到公司在非洲为方便普通平名鉴别假药,而做的一个可以扫描药品的信息,并返回鉴定结果的应用的时候。我被深深震撼了,我的确是第一次听到有公司会无私得去做这些事。在之后的时间里,不断地了解到公司的一些信息,被这个公司的文化深深吸引,被这群可爱的人吸引。</p>
|
||
<p>进到公司才发现自己真的很菜,我会的可能只能说可以简单实现一些代码,但是这些代码的质量我是保证不了的,也没有考虑代码的重构等等。到公司学到很多敏捷方面的实践。但是自己在实践这些的时候做得不够好,我还是会本能地想着尽快实现功能,而会忽略先写测试的重要性。还有个感受就是觉得自己看的书太少太少了。不少东西其他同事讲的时候,我可能没看过,甚至没有听过。这方面希望明年可以多读一点书。</p>
|
||
<p>进了公司,现在也听了其他同事很多的Session,相比我自己确实不好意思站在大家面前去分享,也许这真的是一种胆小。我还需要多多克服。多多分享,to be social.</p>
|
||
<p>其实很多的感受我已经在思维导向图里面说得很清楚了,这里不想再赘述了。2012 我们经历了“世界末日”,2013未来还需要我一步一步去创造。希望自己多多努力,交好运吧。</p>
|
||
<p>Fighting…</p>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="post-footer">
|
||
<div class="post-eof"></div>
|
||
|
||
</footer>
|
||
</article>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="post-block">
|
||
|
||
|
||
|
||
<article itemscope itemtype="http://schema.org/Article" class="post-content" lang="">
|
||
<link itemprop="mainEntityOfPage" href="https://toozhao.com/2012/12/27/move-blog-to-github/">
|
||
|
||
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
|
||
<meta itemprop="image" content="/images/avatar.gif">
|
||
<meta itemprop="name" content="Junv">
|
||
</span>
|
||
|
||
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
|
||
<meta itemprop="name" content="大染志">
|
||
<meta itemprop="description" content="分享编程、运维、生活与思考">
|
||
</span>
|
||
|
||
<span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
|
||
<meta itemprop="name" content=" | 大染志">
|
||
<meta itemprop="description" content="">
|
||
</span>
|
||
<header class="post-header">
|
||
<h2 class="post-title" itemprop="name headline">
|
||
<a href="/2012/12/27/move-blog-to-github/" class="post-title-link" itemprop="url">把博客移到Github</a>
|
||
</h2>
|
||
|
||
<div class="post-meta-container">
|
||
<div class="post-meta">
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">发表于</span>
|
||
|
||
<time title="创建时间:2012-12-28 06:39:00" itemprop="dateCreated datePublished" datetime="2012-12-28T06:39:00+11:00">2012-12-28</time>
|
||
</span>
|
||
<span class="post-meta-item">
|
||
<span class="post-meta-item-icon">
|
||
<i class="far fa-calendar-check"></i>
|
||
</span>
|
||
<span class="post-meta-item-text">更新于</span>
|
||
<time title="修改时间:2026-08-04 20:47:21" itemprop="dateModified" datetime="2026-08-04T20:47:21+10:00">2026-08-04</time>
|
||
</span>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</header>
|
||
|
||
|
||
|
||
|
||
<div class="post-body" itemprop="articleBody">
|
||
<p>做这个决定还是反反复复用了很久的时间,我纠结的原因主要有两个:</p>
|
||
<ol>
|
||
<li>wordpress 的博客使用起来的确更加简单,不用像Octopress这样相对复杂一点。</li>
|
||
<li>主要还是之前觉得不太好把wordpress中的文章转移到Octopress上来。<br>现在这个两个问题都已经解决了。而且我还换了相对比较漂亮的主题,现在算是安心了,当然对我来说Github 有个最大的好处就是不需要为空间付钱。也省得经常备份这些麻烦事。<br>昨天到今天大概花了一天的时间来将我以前的博客迁移到Octopress上来,下面就分享一下吧:<br>Github Page支持的博客主要有两种 Octopress 和 Jekyll BootStrap ,大概比较了一下,最后选择了Octopress,其实我之前也折腾过这些东西,只是后来觉得麻烦就没有继续使用。Octopress的优点在于,它里面包含的插件和相关配置更多。用起来也相对更加方便一点。</li>
|
||
</ol>
|
||
<p>迁移博客数据主要包括文章数据和评论数据,首先迁移文章,我使用的是 <a target="_blank" rel="noopener" href="https://github.com/benbalter/wordpress-to-jekyll-exporter">wordpress-to-jekyll-exporter</a>插件来做,下载其zip文件,然后安装到你的wordpress博客中。在工具菜单中选择导出<strong>Export to Jekyll</strong> 即可导出你的日志数据为 <em>.md的文件,需要注意的是如果你的wordpress文章的固定链接名中含有中文,将无法正确导入到octopress中。<br>接下来将这些</em>.md 文件放入到Octopress博客的 source/_post目录中,然后执行<strong>rake generate</strong>,如果不出意外,你就成功将你的博客文件导入到你的Octopress中了。使用这个插件,默认没有在文章中开启Disqus评论,因此你需要向你的每篇日志文件中手动添加:<br> comments: true</p>
|
||
<p>然后再执行<strong>rake generate</strong> 即可了。<br>评论的话,我们需要先去Disqus申请你的网站的一个评论实例(如果你的wordpress之前就是用Disqus,现在可以忽略这一步,只需要在**_config.yml**配置即可使用了。),然后在你的Wordpress中安装Disuqs插件,并导出评论到Disqus中,这样主要你在Octopress博客中配置好你的Disqus实例短名称,就可以自动同步使用这些评论了。<br>可能你还会发现你的Octopress博客中的图片全都破了,因为这个图片的连接是使用的Wordpress生成的绝对路径,我们需要做的是: </p>
|
||
<ol>
|
||
<li>将wordpress uploads文件夹下的图片文件夹拷贝到Octopress中的**source/images** 目录中 </li>
|
||
<li>在linux下运行如下命令: <blockquote>
|
||
<p>find -name ‘*.md’ | xargs perl -pi -e ‘s|<a target="_blank" rel="noopener" href="http://yourdomain/web-contnet/uploads|/images|g">http://yourdomain/web-contnet/uploads|/images|g</a>‘</p>
|
||
</blockquote>
|
||
</li>
|
||
</ol>
|
||
<p>这样就可以把图片的坏链接修改过来了。<br>大概整个迁移过程就是这样,另外插一句,我的博客是使用的 <a target="_blank" rel="noopener" href="http://zespia.tw/blog/2012/05/02/new-theme-phase/">Phase</a>,大家可自行到链接处去安装使用该主题。</p>
|
||
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<footer class="post-footer">
|
||
<div class="post-eof"></div>
|
||
|
||
</footer>
|
||
</article>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
<nav class="pagination">
|
||
<a class="extend prev" rel="prev" title="上一页" aria-label="上一页" href="/page/2/"><i class="fa fa-angle-left"></i></a><a class="page-number" href="/">1</a><a class="page-number" href="/page/2/">2</a><span class="page-number current">3</span><a class="page-number" href="/page/4/">4</a><span class="space">…</span><a class="page-number" href="/page/31/">31</a><a class="extend next" rel="next" title="下一页" aria-label="下一页" href="/page/4/"><i class="fa fa-angle-right"></i></a>
|
||
</nav>
|
||
|
||
</div>
|
||
</main>
|
||
|
||
<footer class="footer">
|
||
<div class="footer-inner">
|
||
|
||
<div class="copyright">
|
||
© 2012 –
|
||
<span itemprop="copyrightYear">2026</span>
|
||
<span class="with-love">
|
||
<i class="fa fa-heart"></i>
|
||
</span>
|
||
<span class="author" itemprop="copyrightHolder">Junv</span>
|
||
</div>
|
||
<div class="powered-by">由 <a href="https://hexo.io/" rel="noopener" target="_blank">Hexo</a> & <a href="https://theme-next.js.org/muse/" rel="noopener" target="_blank">NexT.Muse</a> 强力驱动
|
||
</div>
|
||
|
||
</div>
|
||
</footer>
|
||
|
||
|
||
<div class="toggle sidebar-toggle" role="button">
|
||
<span class="toggle-line"></span>
|
||
<span class="toggle-line"></span>
|
||
<span class="toggle-line"></span>
|
||
</div>
|
||
<div class="sidebar-dimmer"></div>
|
||
<div class="back-to-top" role="button" aria-label="返回顶部">
|
||
<i class="fa fa-arrow-up fa-lg"></i>
|
||
<span>0%</span>
|
||
</div>
|
||
<div class="reading-progress-bar"></div>
|
||
<a role="button" class="book-mark-link book-mark-link-fixed"></a>
|
||
|
||
<noscript>
|
||
<div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
|
||
</noscript>
|
||
<script>
|
||
/* 字号调节 A- / A / A+(阅读体验) */
|
||
(function () {
|
||
'use strict';
|
||
function initFontSize() {
|
||
var postBody = document.querySelector('.post-body');
|
||
if (!postBody || document.getElementById('font-size-control')) return;
|
||
var bar = document.createElement('div');
|
||
bar.id = 'font-size-control';
|
||
bar.className = 'font-size-control';
|
||
var labels = [['A-', -1], ['A', 0], ['A+', 1]];
|
||
var current = 1.0;
|
||
labels.forEach(function (item) {
|
||
var btn = document.createElement('button');
|
||
btn.textContent = item[0];
|
||
btn.title = item[0] === 'A-' ? '减小字号' : item[0] === 'A+' ? '增大字号' : '恢复默认';
|
||
btn.addEventListener('click', function () {
|
||
if (item[1] === 0) current = 1.0;
|
||
else current = Math.min(1.4, Math.max(0.8, current + item[1] * 0.1));
|
||
postBody.style.fontSize = current + 'em';
|
||
});
|
||
bar.appendChild(btn);
|
||
});
|
||
document.body.appendChild(bar);
|
||
}
|
||
if (document.readyState === 'loading') {
|
||
document.addEventListener('DOMContentLoaded', initFontSize);
|
||
} else {
|
||
initFontSize();
|
||
}
|
||
})();
|
||
</script>
|
||
|
||
</body>
|
||
</html>
|